<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="${request.contextPath}/" />
    <meta name=”renderer” content=”webkit|ie-comp|ie-stand” />
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <link rel="icon" href="favicon.ico">

    <title>编辑表格|力软信息|快速开发平台|Learun敏捷开发框架</title>
    <link href="Content/pace/pace-theme-minimal.css" rel="stylesheet" />
    <link href="Content/font/css/font-awesome.min.css" rel="stylesheet" />
    <link href="Content/bootstrap/bootstrap.min.css" rel="stylesheet" />

    <script src="Content/pace/pace.min.js"></script>
    <script src="Content/jquery/jquery-1.10.2.min.js"></script>
    <script src="Content/bootstrap/bootstrap.min.js"></script>
    <script src="Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js"></script>

    <style>*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}::-webkit-scrollbar-track{border-radius:10px;-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0)}::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,0.05);border-radius:10px;-webkit-box-shadow:inset 1px 1px 0 rgba(0,0,0,.1)}::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,0.2);border-radius:10px;-webkit-box-shadow:inset 1px 1px 0 rgba(0,0,0,.1)}::-webkit-scrollbar{width:16px;height:16px}::-webkit-scrollbar-track,::-webkit-scrollbar-thumb{border-radius:999px;border:5px solid transparent}::-webkit-scrollbar-track{box-shadow:1px 1px 5px rgba(144,146,152,0.3) inset}::-webkit-scrollbar-thumb{min-height:20px;background-clip:content-box;box-shadow:0 0 0 5px rgba(144,146,152,0.3) inset}::-webkit-scrollbar-corner{background:transparent}html{width:100%;height:100%}body{margin:0;padding:0;width:100%;height:100%;font-family:PingFangSC-Regular,Microsoft YaHei,SimSun,Arial,Helvetica,Verdana,sans-serif!important;color:#333;font-size:12px;background-color:initial;overflow:hidden}ul,li{list-style:none;margin:0;padding:0}a{color:#000;text-decoration:none}a:hover{color:#000;text-decoration:none}a:focus{outline:0;-moz-outline:0;color:#000;text-decoration:none}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#fff;opacity:1}.btn-primary{color:#fff;background-color:#3286ed;border-color:#3286ed}.btn-primary:hover{color:#fff;background-color:#156edb;border-color:#156edb}.btn-primary:focus,.btn-primary.focus{color:#fff;background-color:#027dcb;border-color:#0277c1}.btn-primary:active,.btn-primary.active,.open>.btn-primary.dropdown-toggle{color:#fff;background-color:#027dcb;border-color:#0277c1;background-image:none}.btn-primary:active:hover,.btn-primary:active:focus,.btn-primary:active.focus,.btn-primary.active:hover,.btn-primary.active:focus,.btn-primary.active.focus,.open>.btn-primary.dropdown-toggle:hover,.open>.btn-primary.dropdown-toggle:focus,.open>.btn-primary.dropdown-toggle.focus{color:#fff;background-color:#0167a8;border-color:#014e7f}.btn-primary.disabled:focus,.btn-primary.disabled.focus,.btn-primary:disabled:focus,.btn-primary:disabled.focus{background-color:#039cfd;border-color:#039cfd}.btn-primary.disabled:hover,.btn-primary:disabled:hover{background-color:#039cfd;border-color:#039cfd}.btn-default{color:#373a3c;background-color:#fff;border-color:#ccc}.btn-default:hover{color:#373a3c;background-color:#e6e6e6;border-color:#adadad}.btn-default:focus,.btn-default.focus{color:#373a3c;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.btn-default.dropdown-toggle{color:#373a3c;background-color:#e6e6e6;border-color:#adadad;background-image:none}.btn-default:active:hover,.btn-default:active:focus,.btn-default:active.focus,.btn-default.active:hover,.btn-default.active:focus,.btn-default.active.focus,.open>.btn-default.dropdown-toggle:hover,.open>.btn-default.dropdown-toggle:focus,.open>.btn-default.dropdown-toggle.focus{color:#373a3c;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled:focus,.btn-default.disabled.focus,.btn-default:disabled:focus,.btn-default:disabled.focus{background-color:#fff;border-color:#ccc}.btn-default.disabled:hover,.btn-default:disabled:hover{background-color:#fff;border-color:#ccc}.btn-success{color:#fff;background-color:#1bb99a;border-color:#1bb99a}.btn-success:hover{color:#fff;background-color:#158c75;border-color:#13846e}.btn-success:focus,.btn-success.focus{color:#fff;background-color:#158c75;border-color:#13846e}.btn-success:active,.btn-success.active,.open>.btn-success.dropdown-toggle{color:#fff;background-color:#158c75;border-color:#13846e;background-image:none}.btn-success:active:hover,.btn-success:active:focus,.btn-success:active.focus,.btn-success.active:hover,.btn-success.active:focus,.btn-success.active.focus,.open>.btn-success.dropdown-toggle:hover,.open>.btn-success.dropdown-toggle:focus,.open>.btn-success.dropdown-toggle.focus{color:#fff;background-color:#106d5b;border-color:#0b4a3d}.btn-success.disabled:focus,.btn-success.disabled.focus,.btn-success:disabled:focus,.btn-success:disabled.focus{background-color:#1bb99a;border-color:#1bb99a}.btn-success.disabled:hover,.btn-success:disabled:hover{background-color:#1bb99a;border-color:#1bb99a}.btn-warning{color:#fff;background-color:#f1b53d;border-color:#f1b53d}.btn-warning:hover{color:#fff;background-color:#eaa211;border-color:#e19b10}.btn-warning:focus,.btn-warning.focus{color:#fff;background-color:#eaa211;border-color:#e19b10}.btn-warning:active,.btn-warning.active,.open>.btn-warning.dropdown-toggle{color:#fff;background-color:#eaa211;border-color:#e19b10;background-image:none}.btn-warning:active:hover,.btn-warning:active:focus,.btn-warning:active.focus,.btn-warning.active:hover,.btn-warning.active:focus,.btn-warning.active.focus,.open>.btn-warning.dropdown-toggle:hover,.open>.btn-warning.dropdown-toggle:focus,.open>.btn-warning.dropdown-toggle.focus{color:#fff;background-color:#c98b0e;border-color:#a3700c}.btn-warning.disabled:focus,.btn-warning.disabled.focus,.btn-warning:disabled:focus,.btn-warning:disabled.focus{background-color:#f1b53d;border-color:#f1b53d}.btn-warning.disabled:hover,.btn-warning:disabled:hover{background-color:#f1b53d;border-color:#f1b53d}.btn-danger{color:#fff;background-color:#ff5d48;border-color:#ff5d48}.btn-danger:hover{color:#fff;background-color:#ff3015;border-color:#ff270b}.btn-danger:focus,.btn-danger.focus{color:#fff;background-color:#ff3015;border-color:#ff270b}.btn-danger:active,.btn-danger.active,.open>.btn-danger.dropdown-toggle{color:#fff;background-color:#ff3015;border-color:#ff270b;background-image:none}.btn-danger:active:hover,.btn-danger:active:focus,.btn-danger:active.focus,.btn-danger.active:hover,.btn-danger.active:focus,.btn-danger.active.focus,.open>.btn-danger.dropdown-toggle:hover,.open>.btn-danger.dropdown-toggle:focus,.open>.btn-danger.dropdown-toggle.focus{color:#fff;background-color:#f01c00;border-color:#c81700}.btn-danger.disabled:focus,.btn-danger.disabled.focus,.btn-danger:disabled:focus,.btn-danger:disabled.focus{background-color:#ff5d48;border-color:#ff5d48}.btn-danger.disabled:hover,.btn-danger:disabled:hover{background-color:#ff5d48;border-color:#ff5d48}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{padding:0}.form-control{color:#000;border-radius:0;box-shadow:none;font-size:9pt;height:28px;padding-top:0;padding-bottom:1px;padding-right:0;padding-left:5px;resize:none;border-radius:2px}.form-control:focus{border-color:#039cfd;box-shadow:none}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.dropdown-menu a{cursor:pointer}.lr-rblock{position:relative;width:100%;height:100%}.lr-layout-tool-right .btn-default:hover{color:#fff;background-color:#3286ed;border-color:transparent}.lr-scroll-wrap{position:relative;overflow:hidden;height:100%;width:100%}.lr-scroll-box{position:relative;top:0;left:0;min-height:100%;min-width:100%;overflow:hidden;zoom:1}.lr-scroll-vertical{position:absolute;width:6px;height:100%;top:0;right:0;display:none;z-index:100}.lr-scroll-wrap:hover>.lr-scroll-vertical,.lr-scroll-active>.lr-scroll-vertical{display:block}.lr-scroll-vertical-block{position:absolute;width:100%;height:0;top:0;left:0;background-color:#B3B3B3;cursor:pointer;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}.lr-scroll-horizontal{position:absolute;width:100%;height:6px;bottom:0;right:0;display:none;z-index:100}.lr-scroll-wrap:hover>.lr-scroll-horizontal,.lr-scroll-active>.lr-scroll-horizontal{display:block}.lr-scroll-horizontal-block{position:absolute;height:100%;width:0;top:0;left:0;background-color:#B3B3B3;cursor:pointer;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px;-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-moz-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;-o-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}body{background-color:initial!important}.lr-layout-tool-left .lr-layout-tool-item>.form-control{border-radius:4px;display:inline-block;width:200px}.lr-layout-tool-left .btn{position:relative;display:inline-block;height:28px;margin-bottom:1px;line-height:14px}.lr-left-list>li{position:relative;width:100%;height:34px;line-height:34px;margin-bottom:10px;padding-left:20px;cursor:pointer;border-left:3px solid #fff}.lr-left-list>li:hover{background-color:#F5F5F5;border-left:3px solid #F5F5F5}.lr-left-list>li.active{background-color:#F5F5F5;border-left:3px solid #2C3849}.lr-query-wrap{position:relative;width:90px;height:28px}.lr-query-btn{position:relative;width:100%;height:100%;line-height:26px;cursor:pointer;border:1px solid #ccc;border-radius:4px;text-align:center;color:#fff;background-color:#039cfd;border-color:#039cfd}.lr-query-btn:hover{background-color:#027dcb;border-color:#0277c1}.lr-query-content{position:absolute;top:30px;left:0;z-index:10;padding:10px 10px 10px 0;background:#fff;box-shadow:0 0 2px 2px rgba(0,0,0,.15);border-radius:3px;height:300px;width:400px;display:none}.lr-query-content.active{display:block}.lr-query-formcontent{display:none}.lr-query-arrow{position:absolute;top:-16px;left:30px;border-width:8px;border-style:solid;border-color:transparent transparent #d6e1ee}.lr-query-inside{position:absolute;top:-6px;left:-7px;border-width:7px;border-style:solid;border-color:transparent transparent #fff}.lr-query-content-bottom{position:absolute;right:10px;bottom:10px;height:30px}.lr-query-content-bottom .btn{margin-left:10px}.lr-form-item{position:relative;min-height:38px;padding:5px 0 5px 80px}.lr-form-item-title{position:absolute;top:0;left:0;width:80px;height:100%;line-height:38px;text-align:right;padding-right:10px}.lr-form-item-title>font{position:absolute;top:0;right:2px;color:red}.lr-form-item .checkbox,.lr-form-item .radio{moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;margin-top:6px;margin-bottom:0}.lr-form-item .checkbox input[type=checkbox],.lr-form-item .radio input[type=radio]{margin-top:3px;margin-left:-15px}.learun-AdminAccordion .lr-layout-container{border:0;border-radius:0}.learun-AdminAccordion .lr-panel-title{border-bottom:1px solid #dae6f2}.learun-AdminAccordion .lr-panel-tool{border-bottom:2px solid #00aaef}.learun-AdminAccordion .btn-default{border-color:#cfdae5;color:#5f6b7e}[learun-authorize="yes"]{display:none}.lr-layout{position:relative;height:100%;width:100%;padding:5px}.lr-layout.lr-layout-left-center{padding-left:203px}.lr-layout-left{position:absolute;top:0;left:0;width:203px;height:100%;padding:10px 0 10px 10px}.lr-layout-center{position:relative;width:100%;height:100%;padding:5px}.lr-layout-wrap{position:relative;width:100%;height:100%;background-color:#fff;border:1px solid #ccc;padding-top:32px;border-radius:3px;-webkit-transition:opacity .25s ease-out;-moz-transition:opacity .25s ease-out;transition:opacity .25s ease-out;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.lr-layout-center .lr-layout-wrap{padding-top:87px}.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle{padding-top:55px}.lr-layout-left .lr-layout-wrap.lr-layout-wrap-notitle{padding-top:0}.lr-uitheme-accordion .lr-layout-wrap{border-radius:0}.lr-layout-title{position:absolute;top:0;left:0;height:32px;line-height:32px;width:100%;border-bottom:1px solid #ccc;color:#666;text-overflow:ellipsis;white-space:nowrap;font-weight:bold;padding-left:9px;font-size:12px;-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;-khtml-user-select:text;user-select:text}.lr-layout-tool{position:absolute;top:32px;left:0;width:100%;height:55px;border-bottom:1px solid #ccc;z-index:3}.lr-layout-center .lr-layout-wrap.lr-layout-wrap-notitle .lr-layout-tool{top:0}.lr-layout-tool-left{position:absolute;left:10px;top:0;height:100%}.lr-layout-tool-left .lr-layout-tool-item{position:relative;float:left;padding-top:13px;padding-left:5px}.lr-layout-tool-right{position:absolute;right:15px;top:0;height:100%;padding-top:12px}.lr-layout-body{position:relative;width:100%;height:100%}.lr-layout-move{position:absolute;top:0;z-index:1}.lr-layout-move-right{right:-8px;width:8px;height:100%;cursor:col-resize}.lr-tree ul,.lr-tree li{list-style-type:none;margin:0;padding:0}.lr-tree-icon,.lr-tree-ec-icon,.lr-tree-node-cb,.lr-tree-node-icon{border:0 none;height:18px;margin:0;padding:0;margin-top:3px;vertical-align:top;width:16px;background-repeat:no-repeat}.lr-tree-node-cb{height:16px;padding:2px;margin-top:4.5px;margin-right:5px}ul.lr-tree-node-ct{line-height:0;zoom:1}.lr-tree-node-expanded>.lr-tree-ec-icon{background-image:url(Content/images/learuntree/arrows.gif)!important;background:transparent no-repeat -16px 0}.lr-tree-node-expanded>.lr-tree-ec-icon:hover{background:transparent no-repeat -48px 0}.lr-tree-node-collapsed>.lr-tree-ec-icon{background-image:url(Content/images/learuntree/arrows.gif)!important;background:transparent no-repeat 0 0}.lr-tree-node-collapsed>.lr-tree-ec-icon:hover{background:transparent no-repeat -32px 0}.lr-tree-node{white-space:nowrap;color:#000}.lr-tree-node{color:#000}.lr-tree-node i{font-size:13px;width:13px;color:#666}.lr-tree-node a{text-decoration:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;-kthml-user-focus:normal;-moz-user-focus:normal;-moz-outline:0 none;outline:0 none}.lr-tree-node a span{text-decoration:none;padding:1px 3px 1px 2px}.lr-tree-node a:hover{text-decoration:none}.lr-tree-node .lr-tree-selected{background-color:#2F94EE!important;color:#fff}.lr-tree-node .lr-tree-selected a span{color:#fff}.lr-tree-node .lr-tree-selected i{color:#fff}.lr-tree-node-el{position:relative;line-height:25px;cursor:default;cursor:pointer}.lr-tree-node-el:hover{background-color:#eee}.lr-tree-loading{position:absolute;top:3px;right:5px;display:none}.lr-tree-loading>img{height:14px;width:14px}.lr-select{position:relative;cursor:pointer;width:100%;height:28px;line-height:26px;border:1px solid #ccc;background:#fff url(Content/images/learunselect/icon.png) no-repeat right center;padding-left:4px;border-radius:2px}.lr-select.lr-select-focus{border:1px solid #039cfd}.lr-select-placeholder{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;color:#999;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lr-select-option{position:absolute;border:1px solid #dedede;width:100%;background:#fff;z-index:1000;top:28px;border-radius:2px}.lr-select-option-content{position:relative;width:100%}.lr-select-option .lr-selectitem-li{min-height:26px;line-height:26px;overflow:hidden;cursor:pointer;padding:0 5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lr-select-option .lr-selectitem-li:hover{background-color:#eee}.lr-selectitem-li.selected{background-color:#3498DB!important;color:#fff}.lr-select-option-search{border-top:1px solid #ccc;position:absolute;border-bottom:0;left:0;height:25px;width:100%;line-height:24px}.lr-select-option-search>input{color:#000;border-radius:0;border:0;box-shadow:none;font-size:9pt;height:28px;padding-top:0;padding-bottom:1px;padding-right:0;padding-left:5px;resize:none;background-color:#fff;background-image:none;height:24px;line-height:1.42857143;margin:0;-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;width:100%;outline:0;padding:0;padding-left:10px}.lr-select-option-search .input-query{position:absolute;right:4px;top:0;color:#ccc;font-size:16px;cursor:default}.lr-select-node-cb{border:0 none;margin:0;vertical-align:top;width:16px;height:16px;background-repeat:no-repeat;padding:2px;margin-top:4.5px;margin-right:5px}.lr-timeline{position:relative;width:100%;height:100%;padding:5px;overflow:auto}.lr-timeline-allwrap{position:relative;width:100%;min-height:100%;padding:10px;background-color:#f0f3f4;color:#58666e}.lr-timeline ul{padding:0;margin:0}.lr-timeline-header,.lr-timeline-ender{display:block;width:290px;text-align:center}.lr-timeline-ender>div,.lr-timeline-header>div{display:inline-block;background-color:#5bc0de;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px;color:#fff}.lr-timeline-ender>div{background-color:#5cb85c}.lr-timeline-item{display:block}.lr-timeline-item:before,.lr-timeline-item:after{display:table;content:" "}.lr-timeline-wrap{display:block;position:relative;padding:15px 0 15px 20px;margin-left:143px;border-color:#dee5e7;border-style:solid;border-width:0 0 0 4px}.lr-timeline-wrap:hover:before{background:transparent;border-color:#fff}.lr-timeline-current{border-color:#5bc0de}.lr-timeline-wrap:before,.lr-timeline-wrap:after{display:table;content:" "}.lr-timeline-wrap:before{position:relative;top:15px;float:left;width:10px;height:10px;margin-left:-27px;background:#edf1f2;border-color:inherit;border-style:solid;border-width:3px;border-radius:50%;content:"";box-shadow:0 0 0 4px #f0f3f4}.lr-timeline-wrap:after{clear:both}.lr-timeline-date{display:block;position:absolute;top:25px;left:-143px;width:123px;text-align:right}.lr-timeline-content{position:relative;display:inline-block;padding:8px 10px;padding-bottom:0;background-color:#fff;border:1px solid #dee5e7;border-radius:2px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.lr-timeline-content .arrow{position:absolute;display:block;z-index:10;border-width:9px;border-color:transparent;border-style:solid;width:0;height:0;top:19px;left:-9px;margin-top:-9px;border-right-color:rgba(0,0,0,0.1);border-left-width:0}.lr-timeline-content .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;border-width:8px;content:"";bottom:-8px;left:1px;border-right-color:#fff;border-left-width:0}.lr-timeline-title{margin-bottom:8px;color:#333}.lr-timeline-body{margin-left:-10px;margin-right:-10px;padding:12px;border-top:1px solid #edf1f2}.lr-timeline-body>span{color:#5bc0de;cursor:pointer}.lr-formselect{position:relative;width:100%;height:28px;line-height:26px;border:1px solid #ccc;padding-left:4px;cursor:pointer;color:#999}.lr-formselect.selected{color:#000}.lr-formselect>i{position:absolute;top:8px;right:2px;font-size:12px;color:#666}.clear-btn{position:absolute;top:0;right:0;height:100%;width:40px;background-color:#ccc;text-align:center;display:none}.clear-btn:hover{color:#666}.lr-formselect:hover>i{display:none}.lr-formselect:hover .clear-btn{display:block}.lr-custmer-search{position:relative;float:left;width:200px;height:28px}.lr-custmer-search-text{position:relative;float:left;width:100%;height:100%;line-height:26px;cursor:pointer;border:1px solid #ccc;border-radius:4px;padding-left:5px;background:#fff url(Content/images/learunselect/icon.png) no-repeat right center}.lr-custmer-search-text:hover{color:#3498DB}.lr-search-date{position:relative;float:left;width:200px;height:28px}.lr-search-date-text{position:relative;float:left;width:100%;height:100%;line-height:26px;cursor:pointer;border:1px solid #ccc;border-radius:4px;padding-left:25px;background:url(Content/images/datepicker_icon.png) left 0 no-repeat #FFF}.lr-search-date-text:hover{color:#3498DB;border:1px solid #3498DB}.lr-search-date-container{display:none;position:absolute;top:30px;left:0;z-index:10;padding:15px;background:#fff;box-shadow:0 0 2px 2px rgba(0,0,0,.15);border-radius:3px}.lr-search-date-container.width{width:738px}.lr-search-date-arrow{position:absolute;top:-16px;left:53px;border-width:8px;border-style:solid;border-color:transparent transparent #d6e1ee}.lr-search-date-inside{position:absolute;top:-6px;left:-7px;border-width:7px;border-style:solid;border-color:transparent transparent #fff}.lr-search-date-content-btns{position:relative;float:left}.lr-search-date-btn-block{margin-bottom:6px}.lr-search-date-btn-block>a{display:block;width:140px;line-height:28px;height:28px;text-align:center;color:#fff;background:#9da6bd;border-bottom:1px solid #afb8cc}.lr-search-date-btn-block>a:hover{background:#00aaef}.lr-search-date-btn-block>a.active{background:#00aaef}.lr-search-date-datepicker-content{position:relative;width:558px;float:left;margin-left:10px;display:none}.lr-search-date-datepicker-container{position:relative;float:left;z-index:1;width:274px;height:275px;margin-bottom:8px}.lr-search-date-datepicker-container iframe{width:202px;height:203px}.lr-search-date-datepicker-container.first{margin-right:10px}.lr-search-date-datepicker-btn{position:relative;width:100%;text-align:right}.jfgrid-layout{position:relative;height:100%;width:100%;color:#333;overflow:hidden;padding-top:28px}.jfgrid-move-line{position:absolute;height:100%;width:2px;background:#666;top:0;left:10px;display:none;z-index:11;cursor:col-resize}.jfgrid-head{position:absolute;top:0;left:0;width:100%;overflow:hidden;background-color:#f8f8f8}.jfgrid-border{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;position:absolute;top:0;left:0;border-bottom:1px solid #ccc;height:28px;z-index:2;background-color:#f8f8f8}.jfgrid-border-cell{position:absolute;top:0;left:0;width:30px;height:100%;border-right:1px solid #ccc}.jfgrid-border-cb{text-align:center}.jfgrid-border-cb img{cursor:pointer}.jfgrid-head-col{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;position:absolute;top:0;height:100%;z-index:1}.jfgrid-head-cell{position:absolute;line-height:27px;height:28px;width:100px;top:0;left:0;padding:0 3px;border-right:1px solid #ccc;border-bottom:1px solid #ccc;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.jfgrid-heed-sort{position:absolute;top:50%;right:0;width:16px;text-align:center;line-height:initial;margin-top:-12px;display:none}.jfgrid-heed-sort>i{font-size:16px;color:#B3B7BA;display:block}.jfgrid-heed-sort>i.active{color:#475059}.jfgrid-heed-sort>i.fa-caret-up{margin-bottom:-8px}.jfgrid-heed-sort>i.fa-caret-down{margin-top:-8px}.jfgrid-heed-move{position:absolute;width:5px;height:100%;top:0;right:-2px;cursor:col-resize;z-index:10}.jfgrid-body{position:relative;width:100%;height:100%;overflow:hidden;background-color:#fff}.jfgrid-left{position:absolute;min-height:100%;width:30px;top:0;left:0;background-color:#fff;z-index:2}.jfgrid-right{position:relative;min-height:100%;background-color:#fff;z-index:1}.jfgrid-data-cell{position:absolute;top:0;left:0;font-size:12px;color:#333;width:30px;line-height:27px;border-bottom:1px solid #ccc;border-right:1px solid #ccc;padding:0 3px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.jfgrid-layout:hover .jfgrid-data-cell-over{background-color:#eee}.jfgrid-selected{background-color:#2F94EE!important;border-bottom:1px solid #2F94EE!important;border-right:1px solid #2F94EE!important;color:#fff}.jfgrid-data-cell .fa-toggle-on{color:#039cfd;font-size:13pt;vertical-align:middle}.jfgrid-data-cell .fa-toggle-off{color:#aaa;font-size:13pt;vertical-align:middle}.jfgrid-edit-cell{display:none;position:absolute;top:0;left:0;z-index:1;background-color:#fff;border-bottom:1px solid #ccc;border-right:1px solid #ccc}.jfgrid-edit-cell>div{position:relative;width:100%;height:100%;border:0!important}.jfgrid-edit-cell>input{position:relative;width:100%;height:100%;border:0!important;outline:0;padding-left:4px}.jfgrid-edit-cell .radio,.jfgrid-edit-cell .checkbox{moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;margin-top:6px;margin-bottom:initial}.jfgrid-edit-cell .checkbox input[type=checkbox],.jfgrid-edit-cell .radio input[type=radio]{margin-top:3px;margin-left:-15px}.jfgrid-data-cell>.fa-ellipsis-h{display:block;position:absolute;top:9px;right:4px;color:#888;cursor:pointer}.jfgrid-sub{position:absolute;top:0;left:0;padding-left:29px;border-bottom:1px solid #ccc}.jfgrid-sub>div{position:relative;width:100%;height:100%;border-left:1px solid #ccc}.jfgrid-footer{position:absolute;bottom:0;left:0;width:100%;overflow:hidden}.jfgrid-page-bar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none;position:relative;bottom:0;left:0;width:100%;height:35px;border-top:1px solid #ddd;background-color:#fff;border-radius:0 0 3px 3px;z-index:5}.jfgrid-page-bar-info{position:absolute;top:0;left:10px;font-size:12px;height:100%;line-height:34px;color:#475059}.jfgrid-page-bar-info>span{position:relative;top:-1px;color:#475059}.jfgrid-page-bar .paginations{margin:0;position:absolute;right:4px;top:4px;height:26px;line-height:26px}.jfgrid-page-bar .pagination input{display:block;top:0;left:0;height:26px;margin:0;top:0;border-radius:4px;width:45px;line-height:1.5;position:relative;float:left;text-align:center}.jfgrid-page-bar .pagination{margin:0}.jfgrid-page-bar .pagination>li>a,.pagination>li>span{color:#475059}.jfgrid-page-bar .pagination-sm>li>a{padding:3px 8px;font-size:12px;line-height:1.5}.jfgrid-page-bar .pagination>li>span{padding:3px 0;font-size:12px;line-height:1.5;border:0}.pagination>li>a.active,.pagination>li>a:focus{color:#fff;background-color:#3498DB;border-color:#3498DB}.pagination>li>span.active,.pagination>li>span:focus{color:#475059}.pagination>li>span:hover{background-color:#fff;color:#475059}.jfgrid-toolbar{position:relative;bottom:0;left:0;height:29px;width:100%;background:#f8f8f8;border-top:1px solid #ccc;z-index:2}.jfgrid-toolbar>span{line-height:28px;margin-left:10px;cursor:pointer;color:#555}.jfgrid-toolbar>span:hover{color:#000}.jfgrid-data-cell-expend{position:relative;float:left;text-align:right;height:100%}.jfgrid-data-cell-expend>i{width:16px;text-align:center;height:100%;line-height:28px}.jfgrid-statistic{position:absolute;top:0;left:0;height:29px;width:100%;border-top:1px solid #ccc;background:#f8f8f8}.jfgrid-statistic-left{position:absolute;top:0;left:0;height:28px;background:#f8f8f8;z-index:1}.jfgrid-statistic-right{position:relative;height:28px}.jfGird-statistic-cell{position:absolute;border-right:1px solid #ccc;height:100%;line-height:27px;padding:0 3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.jfgrid-nodata-img{position:absolute;top:50%;left:50%;height:180px;width:380px;margin:-90px 0 0 -190px;z-index:3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}</style>
    <script src="Content/laydate/laydate.js"></script>

    <!--[if lt IE 9]>
    <script src="~/Content/bootstrap/html5shiv.min.js"></script>
    <script src="~/Content/bootstrap/respond.min.js"></script>
    <![endif]-->
    <script>
        function request(d) { for (var c = location.search.slice(1).split("&"), a = 0; a < c.length; a++) { var b = c[a].split("="); if (b[0] == d) if ("undefined" == unescape(b[1])) break; else return unescape(b[1]) } return "" };
    </script>
    <script>var lrCurrentUrl='/LR_CodeDemo/GridDemo/EditIndex';var lrModuleButtonList;var lrModuleColumnList;var lrModule;</script>
</head>
<body class="Firefox 65.0 lr-uitheme-default">


<div class="lr-layout">
    <div class="lr-layout-center">
        <div class="lr-layout-wrap lr-layout-wrap-notitle">
            <div class="lr-layout-tool">
                <div class="lr-layout-tool-right">
                    <div class=" btn-group btn-group-sm">
                        <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
                    </div>
                </div>
            </div>
            <div class="lr-layout-body" id="gridtable"></div>
        </div>
    </div>
</div>
<script>
    var refreshGirdData;
    var selectedRow;
    var bootstrap = function (a, b) {
        var c = {
            init: function () {
                c.initGrid()
            }, initGrid: function () {
                a("#gridtable").jfGrid({
                    url: top.$.rootUrl + "/LR_SystemModule/CodeRule/GetPageList.html",
                    headData: [{
                        // label: "输入框", name: "input", width: 120, align: "left", edit: {
                        //     type: "input", init: function (e, d) {
                        //     }, change: function (d, e) {
                        //     }
                        // }
                        label: "输入框", name: "input", width: 120, align: "left",
                        edit: {
                            type: "input"
                        }
                    }, {
                        label: "下拉框", name: "select", width: 120, align: "left", edit: {
                            type: "select", init: function (e, d) {
                            }, change: function (f, e, d) {
                            }, op: {data: [{id: "1", text: "选项一"}, {id: "2", text: "选项二"}, {id: "3", text: "选项三"}, {id: "4", text: "选项四"}]}
                        }
                    }, {
                        label: "单选框", name: "radio", width: 120, align: "left", edit: {
                            type: "radio", datatype: "dataItem", code: "unit", init: function (e, d) {
                            }, change: function (d, e) {
                            }, dfvalue: "1"
                        }
                    }, {
                        label: "多选框", name: "checkbox", width: 260, align: "left", edit: {
                            type: "checkbox", init: function (e, d) {
                            }, change: function (d, e) {
                            }, data: [{id: "1", text: "选项一"}, {id: "2", text: "选项二"}, {id: "3", text: "选项三"}, {id: "4", text: "选项四"}], dfvalue: "1,2"
                        }
                    }, {
                        label: "时间", name: "date", width: 120, align: "left", edit: {
                            type: "datatime", dateformat: "0", init: function (e, d) {
                            }, change: function (d, e) {
                            }
                        }
                    }, {
                        label: "弹层", name: "layer", width: 120, align: "left", edit: {
                            type: "layer", init: function (e, d, f) {
                            }, change: function (d, e, f) {
                                d.layer = f.itemValue;
                                d.layer2 = f.itemName;
                                a("#gridtable").jfGridSet("updateRow", e)
                            }, op: {width: 600, height: 400, colData: [{label: "商品编号", name: "itemValue", width: 100, align: "left"}, {label: "商品名称", name: "itemName", width: 450, align: "left"}], url: top.$.rootUrl + "/LR_SystemModule/DataItem/GetDetaillist", param: {itemCode: "Client_ProductInfo"}}
                        }
                    }, {label: "弹层2", name: "layer2", width: 120, align: "left"}],
                    isEdit: true,
                    isMultiselect: true,
                    mainId: "input",
                    onAddRow: function (d, e) {
                    },
                    onMinusRow: function (d, e) {
                    },
                    beforeMinusRow: function (d) {
                        return true
                    }
                })
            }
        };
        c.init();
        a.lrSetForm(top.$.rootUrl + "/LR_CodeDemo/GridDemo/EditIndexData", function(d) {
            a("#gridtable").jfGridSet("refreshdata", d)
        })
    };
</script>

<script>(function(l,t,o){var m=l([]),q=l.resize=l.extend(l.resize,{}),u,w="setTimeout",v="resize",p=v+"-special-event",n="delay",r="throttleWindow";q[n]=250;q[r]=true;l.event.special[v]={setup:function(){if(!q[r]&&this[w]){return false}var a=l(this);m=m.add(a);l.data(this,p,{w:a.width(),h:a.height()});if(m.length===1){s()}},teardown:function(){if(!q[r]&&this[w]){return false}var a=l(this);m=m.not(a);a.removeData(p);if(!m.length){clearTimeout(u)}},add:function(a){if(!q[r]&&this[w]){return false}var c;function b(h,d,e){var f=l(this),g=l.data(this,p);g.w=d!==o?d:f.width();g.h=e!==o?e:f.height();c.apply(this,arguments)}if(l.isFunction(a)){c=a;return b}else{c=a.handler;a.handler=b}}};function s(){u=t[w](function(){m.each(function(){var c=l(this),b=c.width(),a=c.height(),d=l.data(this,p);if(b!==d.w||a!==d.h){c.trigger(v,[d.w=b,d.h=a])}});s()},q[n])}})(jQuery,this);(function(a){var l=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],k=("onwheel" in document||document.documentMode>=9)?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice,f,d;if(a.event.fixHooks){for(var c=l.length;c;){a.event.fixHooks[l[--c]]=a.event.mouseHooks}}var j=a.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var m=k.length;m;){this.addEventListener(k[--m],b,false)}}else{this.onmousewheel=b}a.data(this,"mousewheel-line-height",j.getLineHeight(this));a.data(this,"mousewheel-page-height",j.getPageHeight(this))},teardown:function(){if(this.removeEventListener){for(var m=k.length;m;){this.removeEventListener(k[--m],b,false)}}else{this.onmousewheel=null}},getLineHeight:function(i){return parseInt(a(i)["offsetParent" in a.fn?"offsetParent":"parent"]().css("fontSize"),10)},getPageHeight:function(i){return a(i).height()},settings:{adjustOldDeltas:true}};a.fn.extend({mousewheel:function(i){return i?this.bind("mousewheel",i):this.trigger("mousewheel")},unmousewheel:function(i){return this.unbind("mousewheel",i)}});function b(q){var s=q||window.event,m=h.call(arguments,1),n=0,o=0,p=0,i=0;q=a.event.fix(s);q.type="mousewheel";if("detail" in s){p=s.detail*-1}if("wheelDelta" in s){p=s.wheelDelta}if("wheelDeltaY" in s){p=s.wheelDeltaY}if("wheelDeltaX" in s){o=s.wheelDeltaX*-1}if("axis" in s&&s.axis===s.HORIZONTAL_AXIS){o=p*-1;p=0}n=p===0?o:p;if("deltaY" in s){p=s.deltaY*-1;n=p}if("deltaX" in s){o=s.deltaX;if(p===0){n=o*-1}}if(p===0&&o===0){return}if(s.deltaMode===1){var r=a.data(this,"mousewheel-line-height");n*=r;p*=r;o*=r}else{if(s.deltaMode===2){var t=a.data(this,"mousewheel-page-height");n*=t;p*=t;o*=t}}i=Math.max(Math.abs(p),Math.abs(o));if(!d||i<d){d=i;if(g(s,i)){d/=40}}if(g(s,i)){n/=40;o/=40;p/=40}n=Math[n>=1?"floor":"ceil"](n/d);o=Math[o>=1?"floor":"ceil"](o/d);p=Math[p>=1?"floor":"ceil"](p/d);q.deltaX=o;q.deltaY=p;q.deltaFactor=d;q.deltaMode=0;m.unshift(q,n,o,p);if(f){clearTimeout(f)}f=setTimeout(e,200);return(a.event.dispatch||a.event.handle).apply(this,m)}function e(){d=null}function g(m,i){return j.settings.adjustOldDeltas&&m.type==="mousewheel"&&i%120===0}})(window.jQuery);(function(a,c,e){var b=null;var d={init:function(j,l){var o=j.attr("id");if(!o){o="lr_"+c.newGuid();j.attr("id",o)}j.addClass("lr-scroll-wrap");var f=j.children();var i=a('<div class="lr-scroll-box" id="'+o+'_box" ></div>');j.append(i);i.append(f);var k=a('<div class="lr-scroll-vertical"   ><div class="lr-scroll-vertical-block" id="'+o+'_vertical"></div></div>');j.append(k);var g=a('<div class="lr-scroll-horizontal" ><div class="lr-scroll-horizontal-block" id="'+o+'_horizontal"></div></div>');j.append(g);if(b===null){b=a('<div style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none;-khtml-user-select: none;user-select: none;display: none;position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 9999;cursor: pointer;" ></div>');a("body").append(b)}var p=i.innerHeight();var q=i.innerWidth();var n=j.height();var r=j.width();var m={id:o,sy:0,sx:0,sh:p,sw:q,h:n,w:r,yh:0,xw:0,callback:l};j[0].op=m;d.update(j);d.bindEvent(j,i,k,g);i=null;f=null;k=null;g=null;j=null},bindEvent:function(h,g,i,f){h.resize(function(){var j=a(this);var l=j[0].op;if(l){var k=j.height();var m=j.width();if(k!=l.h){l.h=k;d.updateY(j)}if(m!=l.w){l.w=m;d.updateX(j)}}j=null});g.resize(function(){var k=a(this);var j=k.parent();var l=j[0].op;if(l){var m=k.innerHeight();var n=k.innerWidth();if(m!=l.sh){l.sh=m;d.updateY(j)}if(n!=l.sw){l.sw=n;d.updateX(j)}}k=null;j=null});h.mousewheel(function(q,n,o,p){var k=a(this);var j=k.find(".lr-select-focus");if(j.length>0){var s="learun_select_option_"+j.attr("id");a("#"+s).slideUp(150);j.removeClass("lr-select-focus")}var l=4+(Math.abs(n)-1)*0.1*q.deltaFactor;if(l>16&&l<300){l=16}else{if(l>=300){l=20}}var r=k[0].op;var m=n*l;if(r.sh>r.h){r.oldsy=r.sy;r.sy=r.sy-m;setTimeout(function(){d.moveY(k,true,true);k=null});if(r.h+r.sy<r.sh&&r.sy>0){return false}}else{if(r.sw>r.w){r.oldsx=r.sx;r.sx=r.sx-m;setTimeout(function(){d.moveX(k,true);k=null});return false}}});i.find(".lr-scroll-vertical-block").on("mousedown",function(k){b.show();var j=a(this).parent().parent();var l=j[0].op;l.isYMousedown=true;l.yMousedown=k.pageY;j.addClass("lr-scroll-active");j=null});f.find(".lr-scroll-horizontal-block").on("mousedown",function(k){b.show();var j=a(this).parent().parent();var l=j[0].op;l.isXMousedown=true;l.xMousedown=k.pageX;j.addClass("lr-scroll-active");j=null});top.$(document).on("mousemove",{$obj:h},function(m){var n=m.data.$obj[0].op;if(n.isYMousedown){var j=m.data.$obj.find(".lr-select-focus");if(j.length>0){var o="learun_select_option_"+j.attr("id");a("#"+o).slideUp(150);j.removeClass("lr-select-focus")}var q=m.pageY;var l=q-n.yMousedown;n.yMousedown=q;n.oldsy=n.sy;n.blockY=n.blockY+l;if((n.blockY+n.yh)>n.h){n.blockY=n.h-n.yh}if(n.blockY<0){n.blockY=0}d.getY(n);d.moveY(m.data.$obj,true)}else{if(n.isXMousedown){var j=m.data.$obj.find(".lr-select-focus");if(j.length>0){var o="learun_select_option_"+j.attr("id");a("#"+o).slideUp(150);j.removeClass("lr-select-focus")}var p=m.pageX;var k=p-n.xMousedown;n.xMousedown=p;n.oldsx=n.sx;n.blockX=n.blockX+k;if((n.blockX+n.xw)>n.w){n.blockX=n.w-n.xw}if(n.blockX<0){n.blockX=0}d.getX(n);d.moveX(m.data.$obj)}}}).on("mouseup",{$obj:h},function(j){j.data.$obj[0].op.isYMousedown=false;j.data.$obj[0].op.isXMousedown=false;b.hide();j.data.$obj.removeClass("lr-scroll-active")})},update:function(f){d.updateY(f);d.updateX(f)},updateY:function(g){var k=g[0].op;var f=g.find("#"+k.id+"_box");var h=g.find("#"+k.id+"_vertical");if(k.sh>k.h){if((k.sh-k.sy)<k.h){var i=0;k.sy=k.sh-k.h;if(k.sy<0){k.sy=0}else{i=0-k.sy}f.css("top",i+"px")}var l=parseInt(k.h*k.h/k.sh);l=(l<30?30:l);k.yh=l;var j=parseInt(k.sy*(k.h-l)/(k.sh-k.h));if((j+l)>k.h){j=k.h-l}if(j<0){j=0}k.blockY=j;h.css({top:j+"px",height:l+"px"})}else{k.blockY=0;k.sy=0;f.css("top","0px");h.css({top:"0px",height:"0px"})}k.callback&&k.callback(k.sx,k.sy);f=null;h=null},updateX:function(h){var k=h[0].op;var g=h.find("#"+k.id+"_box");var f=h.find("#"+k.id+"_horizontal");if(k.sw>k.w){if((k.sw-k.sx)<k.w){var i=0;k.sx=k.sw-k.w;if(k.sx<0){k.sx=0}else{i=0-k.sx}g.css("left",i+"px")}var l=parseInt(k.w*k.w/k.sw);l=(l<30?30:l);k.xw=l;var j=parseInt(k.sx*(k.w-l)/(k.sw-k.w));if((j+l)>k.w){j=k.w-l}if(j<0){j=0}k.blockX=j;f.css({left:j+"px",width:l+"px"})}else{k.sx=0;k.blockX=0;g.css("left","0px");f.css({left:"0px",width:"0px"})}k.callback&&k.callback(k.sx,k.sy);g=null;f=null},moveY:function(g,l,k){var m=g[0].op;var f=g.find("#"+m.id+"_box");var h=g.find("#"+m.id+"_vertical");var i=0;if(m.sy<0){m.sy=0}else{if(m.sy+m.h>m.sh){m.sy=m.sh-m.h;i=0-m.sy}else{i=0-m.sy}}if(l){var j=d.getBlockY(m);if(j==0&&m.sy!=0){m.sy=0;i=0}m.blockY=j;f.css({top:i+"px"});h.css({top:j+"px"})}else{f.css({top:i+"px"});h.css({top:m.blockY+"px"})}if(k){m.callback&&m.callback(m.sx,m.sy)}f=null;h=null},moveX:function(h,k){var l=h[0].op;var g=h.find("#"+l.id+"_box");var f=h.find("#"+l.id+"_horizontal");var i=0;if(l.sx<0){l.sx=0}else{if(l.sx+l.w>l.sw){l.sx=l.sw-l.w;i=0-l.sx}else{i=0-l.sx}}if(k){var j=d.getBlockX(l);if(j==0&&l.sx!=0){l.sx=0;i=0}l.blockX=j;g.css({left:i+"px"});f.css({left:j+"px"})}else{g.css({left:i+"px"});f.css({left:l.blockX+"px"})}l.callback&&l.callback(l.sx,l.sy);g=null;f=null},getBlockY:function(g){var f=parseFloat(g.sy*(g.h-g.yh)/(g.sh-g.h));if((f+g.yh)>g.h){f=g.h-g.yh}if(f<0){f=0}return f},getY:function(f){f.sy=parseInt(f.blockY*(f.sh-f.h)/(f.h-f.yh));if((f.sy+f.h)>f.sh){f.sy=f.sh-f.h}if(f.sy<0){f.sy=0}},getBlockX:function(g){var f=parseFloat(g.sx*(g.w-g.xw)/(g.sw-g.w));if((f+g.xw)>g.w){f=g.w-g.xw}if(f<0){f=0}return f},getX:function(f){f.sx=parseInt(f.blockX*(f.sw-f.w)/(f.w-f.xw));if((f.sx+f.w)>f.sw){f.sx=f.sw-f.w}if(f.sx<0){f.sx=0}},};a.fn.lrscroll=function(f){a(this).each(function(){var g=a(this);d.init(g,f)})};a.fn.lrscrollSet=function(i,g,h){var f=a(this);if(!f[0]||!f[0].op){return}switch(i){case"moveRight":setTimeout(function(){var j=f[0].op;j.oldsx=j.sx;j.sx=j.sw-j.w;d.moveX(f,true);f=null},250);break;case"moveBottom":setTimeout(function(){var j=f[0].op;j.oldsy=j.sy;j.sy=j.sh-j.h;d.moveY(f,true,h);f=null},250);break;case"moveY":setTimeout(function(){var j=f[0].op;j.oldsy=j.sy;j.sy=g;d.moveY(f,true,h);f=null});break;case"moveX":break}}})(window.jQuery,top.learun,window);(function(a,b){a.fn.lrLayout=function(h){var e={blocks:[{target:".lr-layout-left",type:"right",size:203}]};a.extend(e,h||{});var c=a(this);if(c.length<=0){return false}c[0]._lrLayout={dfop:e};e.id="lrlayout"+new Date().getTime();for(var f=0,g=e.blocks.length;f<g;f++){var d=e.blocks[f];c.children(d.target).append('<div class="lr-layout-move lr-layout-move-'+d.type+' " path="'+f+'"  ></div>')}c.on("mousedown",function(m){var n=m.target||m.srcElement;var i=a(n);var j=a(this);var l=j[0]._lrLayout.dfop;if(i.hasClass("lr-layout-move")){var k=i.attr("path");l._currentBlock=l.blocks[k];l._ismove=true;l._pageX=m.pageX}});c.mousemove(function(l){var j=a(this);var k=j[0]._lrLayout.dfop;if(!!k._ismove){var i=j.children(k._currentBlock.target);i.css("width",k._currentBlock.size+(l.pageX-k._pageX));j.css("padding-left",k._currentBlock.size+(l.pageX-k._pageX))}});c.on("click",function(k){var i=a(this);var j=i[0]._lrLayout.dfop;if(!!j._ismove){j._currentBlock.size+=(k.pageX-j._pageX);j._ismove=false}})}})(jQuery,top.learun);(function(a,b){a.lrtree={getItem:function(f,d){var c=f.split(".");var g=d.data;for(var e=0;e<c.length;e++){if(e==0){g=g[c[e]]}else{g=g.ChildNodes[c[e]]}}return g},render:function(d){var g=d[0]._lrtree.dfop;var e=a('<ul class="lr-tree-root" ></ul>');var f=g.data.length;for(var h=0;h<f;h++){var c=a.lrtree.renderNode(g.data[h],0,h,g);e.append(c)}d.append(e);d.lrscroll();g=null},renderNode:function(v,p,w,q){if(v.shide){return""}v._deep=p;v._path=w;var u=v.id.replace(/[^\w]/gi,"_");var x=v.title||v.text;var g=a('<li class="lr-tree-node"></li>');var h=a('<div id="'+q.id+"_"+u+'" tpath="'+w+'" title="'+x+'"  dataId="'+q.id+'"  class="lr-tree-node-el" ></div>');if(v.hasChildren){var o=(v.isexpand||q.isAllExpand)?"lr-tree-node-expanded":"lr-tree-node-collapsed";h.addClass(o)}else{h.addClass("lr-tree-node-leaf")}var i=a('<span class="lr-tree-node-indent"></span>');if(p==1){i.append('<img class="lr-tree-icon" src="'+q.cbiconpath+'s.gif"/>')}else{if(p>1){i.append('<img class="lr-tree-icon" src="'+q.cbiconpath+'s.gif"/>');for(var r=1;r<p;r++){i.append('<img class="lr-tree-icon" src="'+q.cbiconpath+'s.gif"/>')}}}h.append(i);var f=a('<img class="lr-tree-ec-icon" src="'+q.cbiconpath+'s.gif"/>');h.append(f);if(v.showcheck){if(v.checkstate==null||v.checkstate==undefined){v.checkstate=0}var d=a('<img  id="'+q.id+"_"+u+'_cb" + class="lr-tree-node-cb" src="'+q.cbiconpath+q.icons[v.checkstate]+'" />');h.append(d)}if(v.icon!=-1){if(!!v.icon){h.append('<i class="'+v.icon+'"></i>&nbsp;')}else{if(v.hasChildren){if(v.isexpand||q.isAllExpand){h.append('<i class="fa fa-folder-open" style="width:15px">&nbsp;</i>')}else{h.append('<i class="fa fa-folder" style="width:15px">&nbsp;</i>')}}else{h.append('<i class="fa fa-file-o"></i>&nbsp;')}}}var n='<a class="lr-tree-node-anchor" href="javascript:void(0);">';n+='<span data-value="'+v.id+'" class="lr-tree-node-text" >'+v.text+"</span>";n+="</a>";h.append(n);h.on("click",a.lrtree.nodeClick);if(!v.complete){h.append('<div class="lr-tree-loading"><img class="lr-tree-ec-icon" src="'+q.cbiconpath+'loading.gif"/></div>')}g.append(h);if(v.hasChildren){var m=a('<ul  class="lr-tree-node-ct" >');if(!v.isexpand&&!q.isAllExpand){m.css("display","none")}if(v.ChildNodes){var t=v.ChildNodes.length;for(var s=0;s<t;s++){v.ChildNodes[s].parent=v;var e=a.lrtree.renderNode(v.ChildNodes[s],p+1,w+"."+s,q);m.append(e)}g.append(m)}}v.render=true;q=null;return g},renderNodeAsync:function(d,i,f){var e=a('<ul  class="lr-tree-node-ct" >');if(!i.isexpand&&!f.isAllExpand){e.css("display","none")}if(i.ChildNodes){var h=i.ChildNodes.length;for(var g=0;g<h;g++){i.ChildNodes[g].parent=i;var c=a.lrtree.renderNode(i.ChildNodes[g],i._deep+1,i._path+"."+g,f);e.append(c)}d.parent().append(e)}return e},renderToo:function(d){var g=d[0]._lrtree.dfop;var e=d.find(".lr-tree-root");e.html("");var f=g.data.length;for(var h=0;h<f;h++){var c=a.lrtree.renderNode(g.data[h],0,h,g);e.append(c)}g=null},nodeClick:function(i){var j=i.target||i.srcElement;var f=a(this);var d=a("#"+f.attr("dataId"));var h=d[0]._lrtree.dfop;if(j.tagName=="IMG"){var c=a(j);var g=f.next(".lr-tree-node-ct");if(c.hasClass("lr-tree-ec-icon")){if(f.hasClass("lr-tree-node-expanded")){g.slideUp(200,function(){f.removeClass("lr-tree-node-expanded");f.addClass("lr-tree-node-collapsed")})}else{if(f.hasClass("lr-tree-node-collapsed")){var l=f.attr("tpath");var k=a.lrtree.getItem(l,h);if(!k.complete){if(!k._loading){k._loading=true;f.find(".lr-tree-loading").show();b.httpAsync("GET",h.url,{parentId:k.id},function(e){if(!!e){k.ChildNodes=e;g=a.lrtree.renderNodeAsync(f,k,h);g.slideDown(200,function(){f.removeClass("lr-tree-node-collapsed");f.addClass("lr-tree-node-expanded")});k.complete=true;f.find(".lr-tree-loading").hide()}k._loading=false})}}else{g.slideDown(200,function(){f.removeClass("lr-tree-node-collapsed");f.addClass("lr-tree-node-expanded")})}}}}else{if(c.hasClass("lr-tree-node-cb")){var l=f.attr("tpath");var k=a.lrtree.getItem(l,h);if(k.checkstate==1){k.checkstate=0}else{k.checkstate=1}c.attr("src",h.cbiconpath+h.icons[k.checkstate]);a.lrtree.checkChild(a.lrtree.check,k,k.checkstate,h);a.lrtree.checkParent(a.lrtree.check,k,k.checkstate,h);if(!!h.nodeCheck){h.nodeCheck(k,f)}}}}else{var l=f.attr("tpath");var k=a.lrtree.getItem(l,h);h.currentItem=k;a("#"+h.id).find(".lr-tree-selected").removeClass("lr-tree-selected");f.addClass("lr-tree-selected");if(!!h.nodeClick){h.nodeClick(k,f)}}return false},check:function(h,n,o,e){var m=h.checkstate;if(o==1){h.checkstate=n}else{var d=h.ChildNodes;var j=d.length;var c=true;for(var g=0;g<j;g++){d[g].checkstate=d[g].checkstate||0;if((n==1&&d[g].checkstate!=1)||n==0&&d[g].checkstate!=0){c=false;break}}if(c){h.checkstate=n}else{h.checkstate=2}}if(h.render&&m!=h.checkstate){var k=h.id.replace(/[^\w]/gi,"_");var f=a("#"+e.id+"_"+k+"_cb");if(f.length==1){f.attr("src",e.cbiconpath+e.icons[h.checkstate])}}},checkParent:function(d,e,h,c){var f=e.parent;while(f){var g=d(f,h,0,c);if(g===false){break}f=f.parent}},checkChild:function(e,h,j,d){if(e(h,j,1,d)!=false){if(h.ChildNodes!=null&&h.ChildNodes.length>0){var c=h.ChildNodes;for(var f=0,g=c.length;f<g;f++){a.lrtree.checkChild(e,c[f],j,d)}}}},search:function(d,c){var e=false;a.each(c,function(g,h){var f=false;if(!b.validator.isNotNull(d).code||h.text.indexOf(d)!=-1){f=true}if(h.hasChildren){if(a.lrtree.search(d,h.ChildNodes)){f=true}}if(f){e=true;h.isexpand=true;h.shide=false}else{h.shide=true}});return e},findItem:function(e,f,g){var d=null;c(e,f,g);function c(h,j,k){for(var m=0,n=h.length;m<n;m++){if(h[m][f]==g){d=h[m];return true}if(h[m].hasChildren&&h[m].ChildNodes.length>0){if(c(h[m].ChildNodes,j,k)){return true}}}return false}return d},listTotree:function(e,m,g,o,p,d){var n=[];var k={};for(var f=0,j=e.length;f<j;f++){var h=e[f];k[h[m]]=k[h[m]]||[];k[h[m]].push(h)}c(n,"0");function c(i,v){var u=k[v]||[];for(var s=0,t=u.length;s<t;s++){var q=u[s];var r={id:q[g],text:q[o],value:q[p],showcheck:d,checkstate:false,hasChildren:false,isexpand:false,complete:true,ChildNodes:[]};if(c(r.ChildNodes,q[g])){r.hasChildren=true;r.isexpand=true}i.push(r)}return i.length>0}return n},treeTotree:function(f,g,i,j,d,e){var h=[];c(h,f);function c(q,n){for(var o=0,p=n.length;o<p;o++){var k=n[o];var m={id:k[g],text:k[i],value:k[j],showcheck:d,checkstate:false,hasChildren:false,isexpand:true,complete:true,ChildNodes:[]};if(k[e].length>0){m.hasChildren=true;c(m.ChildNodes,k[e])}q.push(m)}}return h},addNode:function(e,i,g,h){var f=e[0]._lrtree.dfop;if(!!g){f.data.splice(h,0,i);var c=a.lrtree.renderNode(i,0,h,f);if(e.find(".lr-tree-root>li").length==0){e.find(".lr-tree-root>li").append(c)}else{e.find(".lr-tree-root>li").eq(h).before(c)}}else{var d=e.find("#"+f.id+"_"+g);var j=d.attr("tpath");var c=a.lrtree.renderNode(i,0,j+"."+h,f);if(d.next().children().length==0){d.next().children().append(c)}else{d.next().children().eq(h).before(c)}}},setValue:function(c){var d=c[0]._lrtree.dfop;if(d.data.length==0){setTimeout(function(){a.lrtree.setValue(c)},100)}else{c.find('span[data-value="'+d._value+'"]').trigger("click")}}};a.fn.lrtree=function(g){var d={icons:["checkbox_0.png","checkbox_1.png","checkbox_2.png"],method:"GET",url:false,param:null,data:[],isAllExpand:false,cbiconpath:top.$.rootUrl+"/Content/images/learuntree/",nodeClick:false,nodeCheck:false};a.extend(d,g);var c=a(this);d.id=c.attr("id");if(d.id==null||d.id==""){d.id="learuntree"+new Date().getTime();c.attr("id",d.id)}c.html("");c.addClass("lr-tree");c[0]._lrtree={dfop:d};c[0]._lrtree.dfop.backupData=d.data;if(d.url){b.httpAsync(d.method,d.url,d.param,function(h){c[0]._lrtree.dfop.data=h||[];c[0]._lrtree.dfop.backupData=c[0]._lrtree.dfop.data;a.lrtree.render(c)})}else{a.lrtree.render(c)}if(d.showcheck){for(var e=0;e<3;e++){var f=new Image();f.src=d.cbiconpath+d.icons[e]}}d=null;return c};a.fn.lrtreeSet=function(i,j){var c=a(this);var e=c[0]._lrtree.dfop;var f=function(p,m,n){for(var o=0,q=p.length;o<q;o++){if(c.find("#"+e.id+"_"+p[o].id.replace(/-/g,"_")).parent().css("display")!="none"){(p[o].showcheck==true&&(p[o].checkstate==1||p[o].checkstate==2))&&m.push(n(p[o]));if(!p[o].showcheck||(p[o].showcheck==true&&(p[o].checkstate==1||p[o].checkstate==2))){if(p[o].ChildNodes!=null&&p[o].ChildNodes.length>0){f(p[o].ChildNodes,m,n)}}}}};var g=function(p,m,n){for(var o=0,q=p.length;o<q;o++){(p[o].showcheck==true&&(p[o].checkstate==1||p[o].checkstate==2)&&!p[o].hasChildren)&&m.push(n(p[o]));if(!p[o].showcheck||(p[o].showcheck==true&&(p[o].checkstate==1||p[o].checkstate==2))){if(p[o].ChildNodes!=null&&p[o].ChildNodes.length>0){g(p[o].ChildNodes,m,n)}}}};var l=function(p,m,n){for(var o=0,q=p.length;o<q;o++){if(p[o].showcheck){p[o].checkstate=0}if(p[o].ChildNodes!=null&&p[o].ChildNodes.length>0){l(p[o].ChildNodes)}}};switch(i){case"allNoCheck":c.find(".lr-tree-node-cb").attr("src",e.cbiconpath+"checkbox_0.png");l(e.data);break;case"allCheck":c.find('.lr-tree-node-cb[src$="checkbox_0.png"]').each(function(){var m=a(this);if(m.parent().parent().find(".lr-tree-node-ct").length==0){m.trigger("click")}m=null});break;case"setCheck":var h=j;a.each(h,function(n,o){var m=c.find("#"+e.id+"_"+o.replace(/-/g,"_"));if(m.next().length==0){m.find(".lr-tree-node-cb").trigger("click")}});break;case"setValue":e._value=j;a.lrtree.setValue(c);break;case"currentItem":return e.currentItem;break;case"getCheckNodesEx":var d=[];g(e.data,d,function(m){return m});return d;break;case"getCheckNodes":var d=[];f(e.data,d,function(m){return m});return d;break;case"getCheckNodeIds":var d=[];f(e.data,d,function(m){return m.id});return d;break;case"getCheckNodeIdsByPath":var d=[];var k;f(e.data,d,function(m){return m.id});return d;break;case"search":a.lrtree.search(j.keyword,e.data);if(b.validator.isNotNull(j.keyword).code){e._isSearch=true}else{if(e._isSearch){e._isSearch=false}}a.lrtree.renderToo(c);break;case"refresh":a.extend(e,j||{});if(!!e.url){b.httpAsync(e.method,e.url,e.param,function(m){c[0]._lrtree.dfop.data=m||[];c[0]._lrtree.dfop.backupData=c[0]._lrtree.dfop.data;a.lrtree.renderToo(c);e._isSearch=false})}else{c[0]._lrtree.dfop.backupData=c[0]._lrtree.dfop.data;a.lrtree.renderToo(c);e._isSearch=false}break;case"addNode":break;case"updateNode":break}}})(jQuery,top.learun);(function(a,b){a(function(){a(document).click(function(c){c=c||Window.event;var d=c.target||c.srcElement;if(d.tagName!="BODY"){a(".lr-select-option").slideUp(150);a(".lr-select").removeClass("lr-select-focus")}})});a.lrselect={htmlToData:function(c){var e=c[0]._lrselect.dfop;var d=c.find("ul");e.data=[];d.find("li").each(function(){var f=a(this);var g={id:f.attr("data-value"),text:f.html()};e.data.push(g)});d.remove();d=null;e=null},calc:function(c,f){var d=0;var i=0;d=a("body").height();i=c.offset().top;var j=i-1;var e=d-i-30;var h=2;if(f.allowSearch){h+=30}h+=f.data.length*26;if(f.placeholder){h+=25}if((f.type==="tree"||f.type==="treemultiple")&&f.data.length>1){h=200}h=f.height||h;var g={type:0,height:0};if(e>130||e>j||e>h){g.height=e>h?h:e}else{g.type=1;g.height=j>h?h:j}return g},initRender:function(h,f){a("#learun_select_option_"+h.id).remove();var c=a('<div class="lr-select-option" id="learun_select_option_'+h.id+'"></div>');var d=a('<div class="lr-select-option-content"></div>');var g=a('<ul id="learun_select_option_content'+h.id+'"></ul>');c.hide();d.html(g);c.prepend(d);if(h.allowSearch){var e=a('<div class="lr-select-option-search"><input type="text" placeholder="搜索关键字"><span class="input-query" title="查询"><i class="fa fa-search"></i></span></div>');c.append(e);c.css("padding-bottom","25px");e.on("click",function(){return false});e.find("input").on("keypress",function(p){p=p||window.event;if(p.keyCode===13){var m=a(this);var r=m.val();var j=m.parents(".lr-select-option");var o=j[0].dfop;if(o.type==="tree"||o.type==="treemultiple"){var k=m.parent().prev();k.lrtreeSet("search",{keyword:r})}else{if(o.type==="default"||o.type==="multiple"){for(var q=0,s=o.data.length;q<s;q++){var n=o.data[q];if(!r||n[o.text].indexOf(r)!=-1){n._lrhide=false}else{n._lrhide=true}}a.lrselect.render(o)}}j=null}})}a("body").append(c);c.on("click",a.lrselect.itemClick);c[0].dfop=h;f.append('<div class="lr-select-placeholder" >=='+h.placeholder+"==</div>");f.attr("type","lrselect").addClass("lr-select");if(h.type!="tree"){d.lrscroll()}},render:function(c){switch(c.type){case"default":a.lrselect.defaultRender(c);break;case"tree":case"treemultiple":a.lrselect.treeRender(c);break;case"gird":break;case"multiple":a.lrselect.multipleRender(c);break;default:break}c.isrender=true},defaultRender:function(e){var d=a("#learun_select_option_content"+e.id);d.html("");if(e.placeholder){d.append('<li data-value="-1" class="lr-selectitem-li" >=='+e.placeholder+"==</li>")}for(var f=0,h=e.data.length;f<h;f++){var g=e.data[f];if(!g._lrhide){var c=a('<li data-value="'+f+'" class="lr-selectitem-li" >'+g[e.text]+"</li>");d.append(c)}}},multipleRender:function(e){var d=a("#learun_select_option_content"+e.id);d.html("");if(e.placeholder){d.append('<li data-value="-1" class="lr-selectitem-li" >=='+e.placeholder+"==</li>")}for(var f=0,h=e.data.length;f<h;f++){var g=e.data[f];if(!g._lrhide){if(!!e.multipleMapValue&&e.multipleMapValue[f]!=undefined){var c=a('<li data-value="'+f+'" class="lr-selectitem-li" ><img class="lr-select-node-cb" src="'+top.$.rootUrl+'/Content/images/learuntree/checkbox_1.png">'+g[e.text]+"</li>");d.append(c)}else{var c=a('<li data-value="'+f+'" class="lr-selectitem-li" ><img class="lr-select-node-cb" src="'+top.$.rootUrl+'/Content/images/learuntree/checkbox_0.png">'+g[e.text]+"</li>");d.append(c)}}}},treeRender:function(e){var c=a("#learun_select_option_"+e.id);c.find(".lr-select-option-content").remove();var d=a('<div class="lr-select-option-content"></div>');c.prepend(d);e.data.unshift({id:"-1",text:"=="+e.placeholder+"==",value:"-1",icon:"-1",parentnodes:"0",showcheck:false,isexpand:false,complete:true,hasChildren:false,ChildNodes:[]});var f={data:e.data,nodeClick:a.lrselect.treeNodeClick};if(e.type==="treemultiple"){f.nodeClick=a.lrselect.treeNodeClick2;f.nodeCheck=a.lrselect.treeNodeCheck}d.lrtree(f)},bindEvent:function(c){c.unbind("click");c.on("click",a.lrselect.click)},click:function(h){var f=a(this);if(f.attr("readonly")=="readonly"||f.attr("disabled")=="disabled"){return false}var g=f[0]._lrselect.dfop;if(!g.isload){return false}if(!g.isrender){a.lrselect.render(g)}h=h||Window.event;var i=h.target||h.srcElement;var c=a(i);var d=a("#learun_select_option_"+g.id);if(d.is(":hidden")){a(".lr-select").removeClass("lr-select-focus");a(".lr-select-option").slideUp(150);f.addClass("lr-select-focus");var n=g.width||f.parent().width();var j=f.innerHeight();var m=f.offset().top;var k=f.offset().left;var l=a.lrselect.calc(f,g);if(l.type==0){d.css({width:n,top:m+j+2,left:k,height:l.height}).show()}else{d.css({width:n,top:m-l.height-2,left:k,height:l.height}).show()}d.find(".lr-select-option-search").find("input").select();if(g.type!="multiple"){d.find(".selected").removeClass("selected");if(g._index!=-1){d.find('.lr-selectitem-li[data-value="'+g._index+'"]').addClass("selected")}}}else{d.slideUp(150);f.removeClass("lr-select-focus")}g=null;h.stopPropagation()},itemClick:function(k){k=k||Window.event;var l=k.target||k.srcElement;var d=a(l);var g=a(this);var j=g[0].dfop;var h=a("#"+j.id);if(j.type!="multiple"){if(d.hasClass("lr-selectitem-li")){var i=d.attr("data-value");g.find(".selected").removeClass("selected");d.addClass("selected");if(j._index!=i){var f=h.find(".lr-select-placeholder");if(i==-1){f.css("color","#999");f.html("=="+j.placeholder+"==")}else{f.css("color","#000");f.html(j.data[i][j.text])}j._index=i;h.trigger("change");if(j.select){j.select(j.data[i])}}g.slideUp(150);h.removeClass("lr-select-focus")}}else{if(d.hasClass("lr-selectitem-li")||d.hasClass("lr-select-node-cb")){var f=h.find(".lr-select-placeholder");var c=d.find(".lr-select-node-cb");var i=d.attr("data-value");if(d.hasClass("lr-select-node-cb")){c=d;i=d.parent().attr("data-value")}j.multipleMapValue=j.multipleMapValue||{};j.multipleValue=j.multipleValue||[];j.multipleText=j.multipleText||[];if(i==-1){f.css("color","#999");f.html("=="+j.placeholder+"==");j.multipleMapValue={};j.multipleValue=[];j.multipleText=[];g.find('.lr-select-node-cb[src$="checkbox_1.png"]').attr("src",top.$.rootUrl+"/Content/images/learuntree/checkbox_0.png");g.slideUp(150);h.removeClass("lr-select-focus")}else{var m=true;if(j.multipleMapValue[i]==undefined){f.css("color","#000");j.multipleValue.push(j.data[i][j.value]);j.multipleText.push(j.data[i][j.text]);j.multipleMapValue[i]=j.data[i];f.html(String(j.multipleText));c.attr("src",top.$.rootUrl+"/Content/images/learuntree/checkbox_1.png")}else{j.multipleValue=[];j.multipleText=[];delete j.multipleMapValue[i];a.each(j.multipleMapValue,function(e,n){j.multipleValue.push(n[j.value]);j.multipleText.push(n[j.text])});if(j.multipleText.length==0){f.css("color","#999");f.html("=="+j.placeholder+"==")}else{f.html(String(j.multipleText))}m=false;c.attr("src",top.$.rootUrl+"/Content/images/learuntree/checkbox_0.png")}h.trigger("change");if(j.select){j.select(j.data[i],m,h)}}}}k.stopPropagation()},treeNodeClick:function(h,d){var e=d.parents(".lr-select-option");var g=e[0].dfop;e.slideUp(150);var f=a("#"+g.id);f.removeClass("lr-select-focus");g.currtentItem=h;var c=f.find(".lr-select-placeholder");c.html(g.currtentItem.text);if(h.value=="-1"){c.css("color","#999")}else{c.css("color","#000")}f.trigger("change");if(g.select){g.select(g.currtentItem)}e=null;f=null},treeNodeClick2:function(i,d){var g=d.parents(".lr-select-option-content");var e=d.parents(".lr-select-option");var h=e[0].dfop;var f=a("#"+h.id);f.removeClass("lr-select-focus");h.currtentItems=[];if(i.value=="-1"){d.parents(".lr-select-option").slideUp(150);g.lrtreeSet("allNoCheck");var c=f.find(".lr-select-placeholder");c.html(i.text);c.css("color","#999");f.trigger("change");if(h.select){h.select([])}}g=null;e=null;f=null},treeNodeCheck:function(m,d){var g=d.parents(".lr-select-option-content");var e=d.parents(".lr-select-option");var j=e[0].dfop;var f=a("#"+j.id);var c=f.find(".lr-select-placeholder");f.removeClass("lr-select-focus");var h=g.lrtreeSet("getCheckNodesEx");j.currtentItems=h;var p="";for(var k=0,n=h.length;k<n;k++){var o=h[k];if(p!=""){p+=","}p+=o.text}if(p==""){c.html("=="+j.placeholder+"==");c.css("color","#999")}else{c.text(p);c.css("color","#000")}f.trigger("change");if(j.select){j.select(j.currtentItems)}g=null;e=null;f=null;c=null},defaultValue:function(d,f){var e=d[0]._lrselect.dfop;e.currtentItem=null;e._index=-1;var c=d.find(".lr-select-placeholder");c.css("color","#999");c.html("=="+e.placeholder+"==");a("#"+e.id+" .lr-select-option .selected").removeClass("selected");e.select&&e.select(null,f);d.trigger("change")}};a.fn.lrselect=function(e){var d={placeholder:"请选择",type:"default",value:"id",text:"text",title:"title",width:false,allowSearch:false,url:false,data:false,param:null,method:"GET",select:false,isload:false,isrender:false};a.extend(d,e||{});var c=a(this);if(c.length==0){return c}d.id=c.attr("id");if(!d.id){return false}if(c[0]._lrselect){return c}c[0]._lrselect={dfop:d};a.lrselect.bindEvent(c);if(d.url){b.httpAsync(d.method,d.url,d.param,function(f){c[0]._lrselect.dfop.data=f||[];c[0]._lrselect.dfop.backdata=f||[];d.isload=true})}else{if(d.data){d.isload=true;d.backdata=d.data}else{a.lrselect.htmlToData(c);d.isload=true;d.backdata=d.data}}a.lrselect.initRender(d,c);return c};a.fn.lrselectRefresh=function(e){var c=a(this);if(c.length==0){return c}if(!c[0]._lrselect){return false}var d=c[0]._lrselect.dfop;if(!d){return false}a.extend(d,e||{});d.isload=false;d.isrender=false;if(d.url){b.httpAsync(d.method,d.url,d.param,function(f){c[0]._lrselect.dfop.data=f||[];c[0]._lrselect.dfop.backdata=f||[];d.isload=true})}else{if(d.data){d.isload=true;d.backdata=d.data}}if(d._setValue!=null&&d._setValue!=undefined){c.lrselectSet(d._setValue)}else{a.lrselect.defaultValue(c,"refresh")}return c};a.fn.lrselectGet=function(){var c=a(this);if(c.length==0){return c}var d=c[0]._lrselect.dfop;var g="";switch(d.type){case"default":if(d.data[d._index]){g=d.data[d._index][d.value]}break;case"tree":if(d.currtentItem){g=d.currtentItem[d.value]}break;case"treemultiple":if(d.currtentItems){for(var e=0,f=d.currtentItems.length;e<f;e++){if(g!=""){g+=","}g+=d.currtentItems[e][d.value]}}break;case"gird":break;case"multiple":d.multipleValue=d.multipleValue||[];return String(d.multipleValue);default:break}return g};a.fn.lrselectSet=function(f){var c=a(this);if(c.length==0){return c}if(!c[0]._lrselect){return c}f=f+"";if(f==""||f=="undefined"||f=="null"){a.lrselect.defaultValue(c);return c}var e=c[0]._lrselect.dfop;e._setValue=null;if(!e){return c}a("#"+e.id+" .lr-select-option .selected").removeClass("selected");function d(m){if(m.isload==false){setTimeout(function(){d(m)},100)}else{if(m.isload==true){var j;switch(m.type){case"default":for(var n=0,o=m.data.length;n<o;n++){if(m.data[n][m.value]==f){m._index=n;j=m.data[n];break}}break;case"tree":j=a.lrtree.findItem(m.data,m.value,f);m.currtentItem=j;break;case"treemultiple":a.lrselect.render(m);a("#learun_select_option_"+m.id+" .lr-select-option-content").lrtreeSet("setCheck",f.split(","));return false;case"gird":break;case"multiple":m.multipleMapValue={};m.multipleValue=[];m.multipleText=[];if(m.isrender){a("#learun_select_option_"+m.id).find('.lr-select-node-cb[src$="checkbox_1.png"]').attr("src",top.$.rootUrl+"/Content/images/learuntree/checkbox_0.png")}var k=f.split(",");for(var n=0,o=m.data.length;n<o;n++){var h=a.inArray(m.data[n][m.value]+"",k);if(h!=-1){m.multipleMapValue[n]=m.data[n];m.multipleValue.push(m.data[n][m.value]);m.multipleText.push(m.data[n][m.text]);if(m.isrender){a("#learun_select_option_"+m.id).find('[data-value="'+n+'"] .lr-select-node-cb').attr("src",top.$.rootUrl+"/Content/images/learuntree/checkbox_1.png")}if(m.select){m.select(m.data[n],true,c)}}}if(m.multipleText.length>0){j=m.multipleText}break;default:break}if(j){if(m.type=="multiple"){var g=c.find(".lr-select-placeholder");if(m.multipleText.length>0){g.css("color","#000")}else{g.css("color","#999")}g.html(String(m.multipleText));c.trigger("change")}else{var g=c.find(".lr-select-placeholder");g.html(j[m.text]);g.css("color","#000");c.trigger("change");if(m.select){m.select(j)}}}else{m._setValue=f}}}}d(e);return c};a.fn.lrselectGetEx=function(){var c=a(this);if(c.length==0){return c}var d=c[0]._lrselect.dfop;var e=null;switch(d.type){case"default":if(d.data[d._index]){e=d.data[d._index]}break;case"tree":if(d.currtentItem){e=d.currtentItem}break;case"treemultiple":if(d.currtentItems){e=d.currtentItems}break;case"gird":break;case"multiple":e=d.multipleValue||[];break;default:break}return e}})(jQuery,top.learun);$.fn.lrtimeline=function(e){var b=$(this);if(b.length==0){return b}b.addClass("lr-timeline");var d=$('<div class="lr-timeline-allwrap"></div>');var c=$("<ul></ul>");if(e.length>0){var a=$('<li class="lr-timeline-header"><div>当前</div></li>');c.append(a);$.each(e,function(j,k){var i=$('<li class="lr-timeline-item" ><div class="lr-timeline-wrap" ></div></li>');if(j==0){i.find("div").addClass("lr-timeline-current")}var h=i.find(".lr-timeline-wrap");var g=$('<div class="lr-timeline-content"><span class="arrow"></span></div>');g.append('<div class="lr-timeline-title">'+k.title+"</div>");g.append('<div class="lr-timeline-body"><span>'+k.people+"</span>"+k.content+"</div>");h.append('<span class="lr-timeline-date">'+k.time+"</span>");h.append(g);var f=g.find(".lr-event");if(f.length>0){f[0].lrdata=k;g.find(".lr-event").on("click",function(){var l=$(this)[0].lrdata;l.callback&&l.callback(l)})}c.append(i)});c.append('<li class="lr-timeline-ender"><div>开始</div></li>')}d.html(c);b.html(d)};(function(a,b){a.lrformselect={init:function(d){var e=d[0]._lrformselect.dfop;d.addClass("lr-formselect");d.attr("type","formselect");var c=a("<span>"+e.placeholder+'</span><i class="fa '+e.icon+'"></i><div class="clear-btn" >清空</div>');d.on("click",a.lrformselect.click);d.html(c)},click:function(h){var d=a(this);var g=d[0]._lrformselect.dfop;var i=h.target||h.srcElement;var c=a(i);if(c.hasClass("clear-btn")){g._itemValue={value:"",text:g.placeholder};d.removeClass("selected");d.find("span").text(g._itemValue.text);if(!!g.select){g.select(g._itemValue)}}else{var j=g._itemValue?g._itemValue.value:"";var f=g.layerUrl;if(f.indexOf("?")!=-1){f+="&dfopid="+g.id}else{f+="?dfopid="+g.id}f+="&selectValue="+j;f+="&selectText="+encodeURI(encodeURI(d.find("span").text()));b.layerForm({id:g.id,title:g.placeholder,url:f,width:g.layerUrlW,height:g.layerUrlH,maxmin:true,callBack:function(e){return top[e].acceptClick(a.lrformselect.callback)}})}},callback:function(f,e,g){var c=a("#"+e);var d=c[0]._lrformselect.dfop;top["lr_selectform_"+e]={_obj:g};d._itemValue=d._itemValue||{};if(d._itemValue.value!=f.value){if(!!d.select){d.select(f)}c.trigger("change")}if(f.value==""){f.text=d.placeholder}else{c.addClass("selected")}c.find("span").text(f.text);d._itemValue=f}};a.fn.lrformselect=function(e){var d={placeholder:"请选择",icon:"fa-plus",layerUrl:false,layerParam:false,layerUrlW:600,layerUrlH:400,dataUrl:null,select:false,};a.extend(d,e||{});var c=a(this);d.id=c.attr("id");if(!d.id){return false}if(!!c[0]._lrformselect){return c}c[0]._lrformselect={dfop:d};a.lrformselect.init(c);return c};a.fn.lrformselectRefresh=function(e){var c=a(this);var d=c[0]._lrformselect.dfop;a.extend(d,e||{});d._itemValue=null;c.find("span").text(d.placeholder)};a.fn.lrformselectGet=function(){var c=a(this);var d=c[0]._lrformselect.dfop;return d._itemValue?d._itemValue.value:""};a.fn.lrformselectSet=function(e){if(e==null||e==undefined){return}var c=a(this);var d=c[0]._lrformselect.dfop;if(e==""){d._itemValue={value:"",text:""};c.removeClass("selected");c.find("span").text(d.placeholder);return false}d._itemValue={value:e};b.httpAsync("GET",d.dataUrl,{keyValue:e},function(f){d._itemValue={value:e};if(!!f&&f!=""){d._itemValue.text=f;c.addClass("selected");c.find("span").text(f)}})};a.lrGirdSelect={init:function(d){var e=d[0]._lrGirdSelect.dfop;d.addClass("lr-formselect");d.attr("type","lrGirdSelect");var c=a("<span>"+e.placeholder+'</span><i class="fa '+e.icon+'"></i><div class="clear-btn" >清空</div>');d.on("click",a.lrGirdSelect.click);d.html(c);b.httpAsync("GET",e.url,e.param,function(f){e._loaded=true;e._data=f||[]});top.lrGirdSelect=top.lrGirdSelect||{};top.lrGirdSelect[e.id]=e},click:function(g){var d=a(this);var f=d[0]._lrGirdSelect.dfop;var h=g.target||g.srcElement;var c=a(h);if(c.hasClass("clear-btn")){f._itemValue={value:"",text:f.placeholder};d.removeClass("selected");d.find("span").text(f._itemValue.text);if(!!f.select){f.select(f._itemValue)}}else{var i=f._itemValue?f._itemValue.value:"";b.layerForm({id:f.id,title:f.placeholder,url:top.$.rootUrl+"/Utility/GirdSelectIndex?dfopid="+f.id,width:f.width,height:f.height,maxmin:true,callBack:function(e){return top[e].acceptClick(a.lrGirdSelect.callback)}})}},callback:function(f,e){var c=a("#"+e);var d=c[0]._lrGirdSelect.dfop;d._itemValue=d._itemValue||{};if(d._itemValue[d.value]!=f[d.value]){if(!!d.select){d.select(f)}c.trigger("change")}if(!f){f.text=d.placeholder}else{c.addClass("selected")}c.find("span").text(f[d.text]);d._itemValue=f}};a.fn.lrGirdSelect=function(e){var d={placeholder:"请选择",icon:"fa-plus",url:"",selectWord:"",headData:[],value:"",text:"",width:600,height:400,select:false,param:{},_loaded:false};a.extend(d,e||{});var c=a(this);d.id=c.attr("id");if(!d.id){return false}if(!!c[0]._lrGirdSelect){return c}c[0]._lrGirdSelect={dfop:d};a.lrGirdSelect.init(c);return c};a.fn.lrGirdSelectGet=function(){var c=a(this);var d=c[0]._lrGirdSelect.dfop;d._itemValue=d._itemValue||{};var e=d._itemValue[d.value]||"";return e};a.fn.lrGirdSelectSet=function(f){var c=a(this);var d=c[0]._lrGirdSelect.dfop;function e(g){if(d._loaded){a.each(d._data,function(h,i){if(i[d.value]==g){if(!!d.select){d.select(i)}c.trigger("change");c.addClass("selected");c.find("span").text(i[d.text]);d._itemValue=i;return false}})}else{setTimeout(function(){e(g)},100)}}e(f)}})(window.jQuery,top.learun);(function(a,b){a.lrcustmerquery={init:function(c){var d=c[0]._lrcustmerquery.dfop;c.parent().append('<div class="learun-isearch-panel"  style="max-height:'+d.maxHeight+'px;" ><ul id="learunisearch_'+d.id+'" ></ul></div>')},bind:function(c){c.on("input propertychange",function(){var d=a(this);a.learunisearch.triggerSearch(c)})},triggerSearch:function(c){var f=c[0]._lrcustmerquery.dfop;var d=a("#learunisearch_"+f.id);d.parent().hide();var e=c.val();if(e){if(!f._isload){f._isSearchneed=true}else{f._first=true;f._value=e;f._begin=0;f._end=100>f.data.length?f.data.length:100;if(f._isSearched){f._isSearched=false;setTimeout(function(){a.learunisearch.search(c)})}}}else{f._isSearchneed=false;d.html("")}},search:function(c){var g=c[0]._lrcustmerquery.dfop;var k=g._value;var e=g._begin;var h=g._end;var f=g.data;for(var j=e;j<h;j++){var d=f[j];if(item[g.text].indexOf(k)!=-1){a.learunisearch.renderNone(c,item[g.text])}}if(h<f.length){g._begin=h;g._end=h+100;if(g._end>f.length){g._end=f.length}setTimeout(function(){a.learunisearch.search(c)})}else{g._isSearched=true}},renderNone:function(c,f){var e=c[0]._lrcustmerquery.dfop;var d=a("#learunisearch_"+e.id);if(e._first){e._first=false;d.html("");d.parent().show()}d.append("<li>"+f+"</li>")}};a.fn.lrcustmerquery=function(e){var d={dfData:[],Fields:[],moduleUrl:"",url:top.$.rootUrl+"/LR_SystemModule/CustmerQuery/GetList",data:[],_isload:false};a.extend(d,e||{});var c=a(this);d.id=c.attr("id");if(!d.id){return false}c[0]._lrcustmerquery={dfop:d};a.lrcustmerquery.init(c);if(!!d.url){b.httpAsync("GET",d.url,d.param,function(f){c[0]._lrcustmerquery.dfop.data=f||[];d._isload=true})}return c}})(jQuery,top.learun);(function(a,b){a.lrdate={init:function(k){var m=k[0]._lrdate.dfop;k.html("");k.addClass("lr-search-date");var l=a('<div class="lr-search-date-text" id="lr_search_date_'+m.id+'" >请选择日期查询</div>');var e=a('<div class="lr-search-date-container" id="lr_search_date_container_'+m.id+'"><div class="lr-search-date-arrow"><div class="lr-search-date-inside"></div></div></div>');var c=a('<div class="lr-search-date-content-btns" id="lr_search_date_content_btns_'+m.id+'"></div>');var f=a('<div class="lr-search-date-btn-block"><a href="javascript:;" data-value="customDate">自定义</a></div>');var d=a('<div class="lr-search-date-btn-block"><a href="javascript:;" data-value="clearDate">清空</a></div>');c.append(f);c.append(d);e.append(c);var j=a('<div class="lr-search-date-datepicker-content"></div>');var g=a('<div class="lr-search-date-datepicker-container first" id="lr_search_date_datepicker1_'+m.id+'"  ></div>');var h=a('<div class="lr-search-date-datepicker-container" id="lr_search_date_datepicker2_'+m.id+'"  ></div>');var i=a('<div class="lr-search-date-datepicker-btn"><a class="btn btn-primary">确定</a></div>');j.append(g);j.append(h);j.append(i);e.append(j);k.append(l);k.append(e);laydate.render({elem:"#lr_search_date_datepicker1_"+m.id,position:"static",showBottom:false,theme:"#2F94EE",min:m.minDate||"1900-1-1",max:m.maxDate||"2099-12-31",change:function(o,n){m._begindate=o+" 00:00:00"}});laydate.render({elem:"#lr_search_date_datepicker2_"+m.id,position:"static",showBottom:false,theme:"#2F94EE",min:m.minDate||"1900-1-1",max:m.maxDate||"2099-12-31",change:function(o,n){m._enddate=o+" 23:59:59"}});l.on("click",function(r){var p=a(this);var o=p.parents(".lr-search-date");var q=o[0]._lrdate.dfop;var n=o.find("#lr_search_date_container_"+q.id);if(n.is(":hidden")){n.show()}else{n.hide()}});a(document).click(function(o){var p=o.target||o.srcElement;var n=a(p);if(!n.hasClass("lr-search-date")&&n.parents(".lr-search-date").length<=0){a(".lr-search-date-container").hide()}});f.find("a").on("click",function(q){var o=a(this);var n=o.parents(".lr-search-date");var p=n[0]._lrdate.dfop;n.find(".lr-search-date-content-btns a.active").removeClass("active");a("#lr_search_date_container_"+p.id).addClass("width");o.addClass("active");n.find(".lr-search-date-datepicker-content").show()});d.find("a").on("click",function(s){var q=a(this);var o=q.parents(".lr-search-date");var r=o[0]._lrdate.dfop;var n=o.find("#lr_search_date_container_"+r.id);var p=o.find("#lr_search_date_"+r.id);n.hide();o.find(".lr-search-date-content-btns a.active").removeClass("active");p.html("");if(!!r.selectfn){r.selectfn("1753-01-01","3000-01-01")}});i.find("a").on("click",function(){var o=a(this).parents(".lr-search-date");var q=o[0]._lrdate.dfop;var n=o.find("#lr_search_date_container_"+q.id);var p=o.find("#lr_search_date_"+q.id);n.hide();var r=b.formatDate(q._begindate,"yyyy-MM-dd")+"~"+b.formatDate(q._enddate,"yyyy-MM-dd");p.html(r);if(!!q.selectfn){q.selectfn(q._begindate,q._enddate)}})},monthinit:function(e){var f=e[0]._lrdate.dfop;var d=a("#lr_search_date_content_btns_"+f.id);var c=a('<div class="lr-search-date-btn-block"></div>');if(f.premShow){c.append('<a href="javascript:;" class="datebtn" data-value="preM">上月</a>')}if(f.mShow){c.append('<a href="javascript:;" class="datebtn" data-value="currentM">本月</a>')}d.prepend(c);f=null},jinit:function(e){var f=e[0]._lrdate.dfop;var d=a("#lr_search_date_content_btns_"+f.id);var c=a('<div class="lr-search-date-btn-block"></div>');if(f.prejShow){c.append('<a href="javascript:;" class="datebtn" data-value="preJ">上季度</a>')}if(f.jShow){c.append('<a href="javascript:;" class="datebtn" data-value="currentJ">本季度</a>')}d.prepend(c);f=null},yinit:function(e){var f=e[0]._lrdate.dfop;var d=a("#lr_search_date_content_btns_"+f.id);var c=a('<div class="lr-search-date-btn-block"></div>');if(f.ysShow){c.append('<a href="javascript:;" class="datebtn" data-value="yS">上半年</a>')}if(f.yxShow){c.append('<a href="javascript:;" class="datebtn" data-value="yX">下半年</a>')}if(f.preyShow){c.append('<a href="javascript:;" class="datebtn" data-value="preY">去年</a>')}if(f.yShow){c.append('<a href="javascript:;" class="datebtn" data-value="currentY">今年</a>')}d.prepend(c);f=null},custmerinit:function(e){var f=e[0]._lrdate.dfop;var d=a("#lr_search_date_content_btns_"+f.id);var c=a('<div class="lr-search-date-btn-block"></div>');for(var g=0,j=f.dfdata.length;g<j;g++){var h=f.dfdata[g];if(h){c.append('<a href="javascript:;" class="datebtn" data-value="'+g+'">'+h.name+"</a>")}}d.prepend(c);f=null},bindEvent:function(c){c.find(".datebtn").on("click",function(){var e=a(this);var d=e.parents(".lr-search-date");var f=e.attr("data-value");a.lrdate.select(d,f)})},select:function(f,n){var k=f[0]._lrdate.dfop;var e=f.find("#lr_search_date_container_"+k.id);var g=f.find("#lr_search_date_"+k.id);var c=a("#lr_search_date_content_btns_"+k.id);c.find(".active").removeClass("active");var h=c.find('.datebtn[data-value="'+n+'"]').addClass("active");switch(n){case"preM":var i=b.getPreMonth();k._begindate=i.begin;k._enddate=i.end;break;case"currentM":var i=b.getMonth();k._begindate=i.begin;k._enddate=i.end;break;case"preJ":var i=b.getPreQuarter();k._begindate=i.begin;k._enddate=i.end;break;case"currentJ":var i=b.getCurrentQuarter();k._begindate=i.begin;k._enddate=i.end;break;case"yS":var i=b.getFirstHalfYear();k._begindate=i.begin;k._enddate=i.end;break;case"yX":var i=b.getSecondHalfYear();k._begindate=i.begin;k._enddate=i.end;break;case"preY":var i=b.getPreYear();k._begindate=i.begin;k._enddate=i.end;break;case"currentY":var i=b.getYear();k._begindate=i.begin;k._enddate=i.end;break;default:var m=parseInt(n);var j=k.dfdata[m];k._begindate=j.begin();k._enddate=j.end();break}e.hide();var l=b.formatDate(k._begindate,"yyyy-MM-dd")+"~"+b.formatDate(k._enddate,"yyyy-MM-dd");g.html(l);a("#lr_search_date_container_"+k.id).removeClass("width");f.find(".lr-search-date-datepicker-content").hide();if(!!k.selectfn){k.selectfn(k._begindate,k._enddate)}}};a.fn.lrdate=function(e){var d={dfdata:[],mShow:true,premShow:true,jShow:true,prejShow:true,ysShow:true,yxShow:true,preyShow:true,yShow:true,dfvalue:-1,selectfn:false,minDate:"",maxDate:"",};a.extend(d,e||{});var c=a(this);d.id=c.attr("id");if(!d.id){return false}c[0]._lrdate={dfop:d};a.lrdate.init(c);a.lrdate.yinit(c);a.lrdate.jinit(c);a.lrdate.monthinit(c);a.lrdate.custmerinit(c);a.lrdate.bindEvent(c);if(d.dfvalue!=-1){a.lrdate.select(c,d.dfvalue)}return c};window.WdatePicker=function(h){var f=window.event||arguments.callee.caller.arguments[0];if(f){var g=f.target||f.srcElement;var c=a(g);if(!c.hasClass("lr-laydate-init")){h=h||{};h.dateFmt=h.dateFmt||"yyyy-MM-dd";var d="date";if(h.dateFmt=="yyyy-MM-dd HH:mm"||h.dateFmt=="yyyy-MM-dd HH:mm:ss"){d="datetime"}laydate.render({elem:g,trigger:"click",theme:"#2F94EE",format:h.dateFmt,type:d,done:function(){c.trigger("change")}});c.addClass("lr-laydate-init");if(f.type=="click"){setTimeout(function(){c.trigger("click")},100);return false}}}}})(jQuery,top.learun);(function(a,b){a.lrValidformMessage=function(d,e){d.addClass("lr-field-error");d.parent().append('<div class="lr-field-error-info" title="'+e+'！"><i class="fa fa-info-circle"></i></div>');var f=d.parent().find(".form-item-title").text()+" "+e;b.alert.error("表单信息输入有误,请检查！</br>"+f);if(d.attr("type")=="lrselect"){d.on("change",function(){c(a(this))})}else{if(d.attr("type")=="formselect"){d.on("change",function(){c(a(this))})}else{if(d.hasClass("lr-input-wdatepicker")){d.on("change",function(){var g=a(this);if(g.val()){c(g)}})}else{d.on("input propertychange",function(){var g=a(this);if(g.val()){c(g)}})}}}};a.fn.lrRemoveValidMessage=function(){c(a(this))};a.fn.lrValidform=function(){var e=true;var f=b.validator;var d=a(this).lrGetFormData();a(this).find("[isvalid=yes]").each(function(){var g=a(this);if(g.parent().find(".lr-field-error-info").length>0){e=false;return true}var h=a(this).attr("checkexpession");var i=f["is"+h];if(!h||!i){return false}var j=a(this).attr("errormsg")||"";var k=g.attr("id");var n=d[k];var m={code:true,msg:""};if(h=="LenNum"||h=="LenNumOrNull"||h=="LenStr"||h=="LenStrOrNull"){var l=g.attr("length");m=i(n,l)}else{m=i(n)}if(!m.code){e=false;a.lrValidformMessage(g,j+m.msg)}});return e};function c(d){d.removeClass("lr-field-error");d.parent().find(".lr-field-error-info").remove()}})(window.jQuery,top.learun);(function(a,b){a.fn.lrAuthorizeJfGrid=function(d){var c=[];a.each(d.headData,function(e,f){if(!!lrModuleColumnList[f.name.toLowerCase()]){c.push(f)}});d.headData=c;a(this).jfGrid(d)};a(function(){function c(){if(!!lrModuleButtonList){var d=a('[learun-authorize="yes"]');d.find("[id]").each(function(){var e=a(this);var f=e.attr("id");if(!lrModuleButtonList[f]){e.remove()}});d.find(".dropdown-menu").each(function(){var e=a(this);if(e.find("li").length==0){e.remove()}});d.css({display:"inline-block"})}else{setTimeout(c,100)}}c()})})(window.jQuery,top.learun);(function(a,b){a(function(){function c(){if(!!lrModule){b.httpAsync("GET",top.$.rootUrl+"/LR_SystemModule/ExcelImport/GetList",{moduleId:lrModule.F_ModuleId},function(f){if(!!f&&f.length>0){var e=a(".lr-layout-tool-right");var d=a('<div class=" btn-group btn-group-sm"></div>');var g=false;a.each(f,function(i,j){if(!!lrModuleButtonList[j.F_ModuleBtnId]){g=true;var h=a('<a id="'+j.F_ModuleBtnId+'" data-value="'+j.F_Id+'"  class="btn btn-default"><i class="fa fa-sign-in"></i>&nbsp;'+j.F_BtnName+"</a>");h.on("click",function(){var k=a(this).attr("data-value");var l=a(this).text();b.layerForm({id:"ImportForm",title:l,url:top.$.rootUrl+"/LR_SystemModule/ExcelImport/ImportForm?id="+k,width:600,height:400,maxmin:true,btn:null})});d.append(h)}});e.append(d)}});b.httpAsync("GET",top.$.rootUrl+"/LR_SystemModule/ExcelExport/GetList",{moduleId:lrModule.F_ModuleId},function(f){if(!!f&&f.length>0){var e=a(".lr-layout-tool-right");var d=a('<div class=" btn-group btn-group-sm"></div>');var g=false;a.each(f,function(i,j){if(!!lrModuleButtonList[j.F_ModuleBtnId]){g=true;var h=a('<a id="'+j.F_ModuleBtnId+'" class="btn btn-default"><i class="fa fa-sign-out"></i>&nbsp;'+j.F_BtnName+"</a>");h[0].dfop=j;h.on("click",function(){j=h[0].dfop;b.layerForm({id:"ExcelExportForm",title:"导出Excel数据",url:top.$.rootUrl+"/Utility/ExcelExportForm?gridId="+j.F_GridId+"&filename="+encodeURI(encodeURI(j.F_Name)),width:500,height:380,callBack:function(k){return top[k].acceptClick()},btn:["导出Excel","关闭"]})});d.append(h)}});e.append(d)}})}else{setTimeout(c,100)}}c()})})(window.jQuery,top.learun);(function(a,b){a.fn.lrGetFormData=function(d){var e={};a(this).find("input,select,textarea,.lr-select,.lr-formselect,.lrUploader-wrap,.lr-radio,.lr-checkbox,.edui-default").each(function(i){var h=a(this).attr("id");if(!!h){var j=a(this).attr("type");switch(j){case"radio":if(a("#"+h).is(":checked")){var g=a("#"+h).attr("name");e[g]=a("#"+h).val()}break;case"checkbox":if(a("#"+h).is(":checked")){e[h]=1}else{e[h]=0}break;case"lrselect":e[h]=a(this).lrselectGet();break;case"formselect":e[h]=a(this).lrformselectGet();break;case"lrGirdSelect":e[h]=a(this).lrGirdSelectGet();break;case"lr-Uploader":e[h]=a(this).lrUploaderGet();break;case"lr-radio":e[h]=a(this).find("input:checked").val();break;case"lr-checkbox":var f=[];a(this).find("input:checked").each(function(){f.push(a(this).val())});e[h]=String(f);break;default:if(a("#"+h).hasClass("currentInfo")){var k=a("#"+h)[0].lrvalue;e[h]=a.trim(k)}else{if(a(this).hasClass("edui-default")){if(a(this)[0].ue){e[h]=a(this)[0].ue.getContent(null,null,true).replace(/[<>&"]/g,function(l){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[l]})}}else{var k=a("#"+h).val();e[h]=a.trim(k)}}break}e[h]+="";if(e[h]==""){e[h]="&nbsp;"}if(e[h]=="&nbsp;"&&!d){e[h]=""}}});return e};a.fn.lrSetFormData=function(g){var e=a(this);for(var h in g){var l=g[h];var d=e.find("#"+h);if(d.length==0&&l!=null){d=e.find('[name="'+h+'"][value="'+l+'"]');if(d.length>0){if(!d.is(":checked")){d.trigger("click")}}}else{var j=d.attr("type");if(d.hasClass("lr-input-wdatepicker")){j="datepicker"}switch(j){case"checkbox":var i=0;if(d.is(":checked")){i=1}else{i=0}if(i!=parseInt(l)){d.trigger("click")}break;case"lrselect":d.lrselectSet(l);break;case"formselect":d.lrformselectSet(l);break;case"lrGirdSelect":d.lrGirdSelectSet(l);break;case"datepicker":var f=d.attr("data-dateFmt")||"yyyy-MM-dd";d.val(b.formatDate(l,f));break;case"lr-Uploader":d.lrUploaderSet(l);break;case"lr-radio":if(!d.find('input[value="'+l+'"]').is(":checked")){d.find('input[value="'+l+'"]').trigger("click")}break;default:if(d.hasClass("currentInfo")){d[0].lrvalue=l;if(d.hasClass("lr-currentInfo-user")){d.val("");b.clientdata.getAsync("user",{key:l,callback:function(m,n){n.obj.val(m.name)},obj:d})}else{if(d.hasClass("lr-currentInfo-company")){d.val("");b.clientdata.getAsync("company",{key:l,callback:function(m,n){n.obj.val(m.name)},obj:d})}else{if(d.hasClass("lr-currentInfo-department")){d.val("");b.clientdata.getAsync("department",{key:l,callback:function(m,n){n.obj.val(m.name)},obj:d})}else{d.val(l)}}}}else{if(d.hasClass("edui-default")){var k=d[0].ue;c(k,l)}else{d.val(l)}}break}}}};function c(d,e){d.ready(function(){var f={lt:"<",gt:">",nbsp:" ",amp:"&",quot:'"'};var g=e.replace(/&(lt|gt|nbsp|amp|quot);/ig,function(h,i){return f[i]});d.setContent(g)})}a.lrSetForm=function(e,d){b.loading(true,"正在获取数据");b.httpAsyncGet(e,function(f){b.loading(false);if(f.code==b.httpCode.success){d(f.data)}else{b.layerClose(window.name);b.alert.error("表单数据获取失败,请重新获取！");b.httpErrorLog(f.info)}})};a.lrSaveForm=function(g,f,d,e){f.__RequestVerificationToken=a.lrToken;b.loading(true,"正在保存数据");b.httpAsyncPost(g,f,function(h){b.loading(false);if(h.code==b.httpCode.success){if(!!d){d(h)}b.alert.success(h.info);if(!e){b.layerClose(window.name)}}else{b.alert.error(h.info);b.httpErrorLog(h.info)}})};a.lrPostForm=function(e,d){d.__RequestVerificationToken=a.lrToken;b.loading(true,"正在提交数据");b.httpAsyncPost(e,d,function(f){b.loading(false);if(f.code==b.httpCode.success){b.alert.success(f.info)}else{b.alert.error(f.info);b.httpErrorLog(f.info)}})};a.fn.lrFormTab=function(){var d=a(this);d.parent().css({"padding-top":"44px"});d.lrscroll();d.on("DOMNodeInserted",function(g){var f=a(this);var h=0;f.find("li").each(function(){h+=a(this).outerWidth()});f.find(".lr-scroll-box").css({width:h})});var d=a(this);var e=0;d.find("li").each(function(){e+=a(this).outerWidth()});d.find(".lr-scroll-box").css({width:e});d.delegate("li","click",{$ul:d},function(i){var g=a(this);if(!g.hasClass("active")){var h=g.parent();var f=i.data.$ul.next();var j=g.find("a").attr("data-value");h.find("li.active").removeClass("active");g.addClass("active");f.find(".tab-pane.active").removeClass("active");f.find("#"+j).addClass("active")}})};a.fn.lrFormTabEx=function(e){var d=a(this);d.delegate("li","click",{$ul:d},function(i){var g=a(this);if(!g.hasClass("active")){var h=g.parent();var f=i.data.$ul.next();var j=g.find("a").attr("data-value");h.find("li.active").removeClass("active");g.addClass("active");f.find(".tab-pane.active").removeClass("active");f.find("#"+j).addClass("active");if(!!e){e(j)}}})};a.lrExistField=function(g,e,i,h){var d=a("#"+e);if(!d.val()){return false}var f={keyValue:g};f[e]=d.val();a.extend(f,h);b.httpAsync("GET",i,f,function(j){if(j==false){a.lrValidformMessage(d,"已存在,请重新输入")}})};a.fn.lrDataItemSelect=function(h){var e={allowSearch:false,param:{itemCode:"",parentId:"0"},};h=h||{};if(!h.code){return a(this)}e.param.itemCode=h.code;e.param.parentId=h.parentId||"0";e.allowSearch=h.allowSearch;var f=[];if(!!h.childId){var g=[];a("#"+h.childId).lrselect({allowSearch:e.allowSearch});e.select=function(i){if(!i){a("#"+h.childId).lrselectRefresh({data:[]})}else{g=[];b.clientdata.getAllAsync("dataItem",{code:e.param.itemCode,callback:function(j){a.each(j,function(k,l){if(l.parentId==i.k){g.push({id:l.text,text:l.value,title:l.text,k:k})}});a("#"+h.childId).lrselectRefresh({data:g})}})}}}var d=a(this).lrselect(e);b.clientdata.getAllAsync("dataItem",{code:e.param.itemCode,callback:function(i){a.each(i,function(j,k){if(k.parentId==e.param.parentId){f.push({id:k.value,text:k.text,title:k.text,k:j})}});d.lrselectRefresh({data:f})}});return d};a.fn.lrDataSourceSelect=function(f){f=f||{};var e={allowSearch:true,select:f.select,};if(!f.code){return a(this)}var d=a(this).lrselect(e);b.clientdata.getAllAsync("sourceData",{code:f.code,callback:function(g){d.lrselectRefresh({value:f.value,text:f.text,title:f.text,data:g})}});return d};a.fn.lrCompanySelect=function(f){var e={type:"tree",allowSearch:true,url:top.$.rootUrl+"/LR_OrganizationModule/Company/GetTree",param:{parentId:"0"},};f=f||{};e.param.parentId=f.parentId||"0";if(!!f.isLocal){e.url=""}var d=a(this).lrselect(e);if(!!f.isLocal){b.clientdata.getAllAsync("company",{callback:function(h){var i={};var j=[];a.each(h,function(k,l){i[l.parentId]=i[l.parentId]||[];l.id=k;i[l.parentId].push(l)});g(j,e.param.parentId);function g(k,r){var q=i[r]||[];for(var o=0,p=q.length;o<p;o++){var m=q[o];var n={id:m.id,text:m.name,value:m.id,showcheck:false,checkstate:false,hasChildren:false,isexpand:false,complete:true,ChildNodes:[]};if(g(n.ChildNodes,m.id)){n.hasChildren=true;n.isexpand=true}k.push(n)}return k.length>0}d.lrselectRefresh({data:j})}})}return d};a.fn.lrDepartmentSelect=function(e){var d={type:"tree",allowSearch:true,url:top.$.rootUrl+"/LR_OrganizationModule/Department/GetTree",param:{companyId:"",parentId:"0"},};e=e||{};d.param.companyId=e.companyId;d.param.parentId=e.parentId;d.maxHeight=e.maxHeight||200;if(typeof(e.select)=="function"){d.select=e.select}return a(this).lrselect(d)};a.fn.lrUserSelect=function(d){if(d==0){a(this).lrformselect({layerUrl:top.$.rootUrl+"/LR_OrganizationModule/User/SelectOnlyForm",layerUrlW:400,layerUrlH:300,dataUrl:top.$.rootUrl+"/LR_OrganizationModule/User/GetListByUserIds"})}else{a(this).lrformselect({layerUrl:top.$.rootUrl+"/LR_OrganizationModule/User/SelectForm",layerUrlW:800,layerUrlH:520,dataUrl:top.$.rootUrl+"/LR_OrganizationModule/User/GetListByUserIds"})}};a.fn.lrAreaSelect=function(h){var f={value:"F_AreaCode",text:"F_AreaName",title:"F_AreaName",allowSearch:true,url:top.$.rootUrl+"/LR_SystemModule/Area/Getlist",param:{parentId:""},};h=h||{};if(!!h.parentId){f.param.parentId=h.parentId}var e=[],g=0;var d=a(this);a(this).find("div").each(function(){var i=a("<div></div>");var j=a(this);f.placeholder=j.attr("placeholder");i.addClass(j.attr("class"));j.removeAttr("class");j.removeAttr("placeholder");i.append(j);d.append(i);if(g==0){j.lrselect(f)}else{f.url="";f.parentId="";j.lrselect(f);e[g-1].on("change",function(){var k=a(this).lrselectGet();if(k==""){j.lrselectRefresh({url:"",param:{parentId:k},data:[]})}else{j.lrselectRefresh({url:top.$.rootUrl+"/LR_SystemModule/Area/Getlist",param:{parentId:k},})}})}g++;e.push(j)})};a.fn.lrDbSelect=function(e){var d={type:"tree",allowSearch:true,url:top.$.rootUrl+"/LR_SystemModule/DatabaseLink/GetTreeList"};e=e||{};return a(this).lrselect(d)};a.fn.lrRadioCheckbox=function(f){var e={type:"radio",dataType:"dataItem",code:"",text:"F_ItemName",value:"F_ItemValue"};a.extend(e,f||{});var d=a(this);d.addClass(e.type);d.addClass("lr-"+e.type);d.attr("type","lr-"+e.type);var g=d.attr("id");if(e.dataType=="dataItem"){b.clientdata.getAllAsync("dataItem",{code:e.code,callback:function(h){a.each(h,function(j,k){var i=a('<label><input name="'+g+'" value="'+k.value+'" type="'+e.type+'">'+k.text+"</label>");d.append(i)});d.find("input").eq(0).trigger("click")}})}else{b.clientdata.getAllAsync("sourceData",{code:e.code,callback:function(h){a.each(h,function(j,k){var i=a('<label><input name="'+g+'" value="'+k[e.value]+'"" type="'+e.type+'">'+k[e.text]+"</label>");d.append(i)});d.find("input").eq(0).trigger("click")}})}};a.fn.lrMultipleQuery=function(h,g,i){var d=a(this);var f=d.html();d.addClass("lr-query-wrap");var e="";e+='<div class="lr-query-btn"><i class="fa fa-search"></i>&nbsp;多条件查询</div>';e+='<div class="lr-query-content">';e+=f;e+='<div class="lr-query-arrow"><div class="lr-query-inside"></div></div>';e+='<div class="lr-query-content-bottom">';e+='<a id="lr_btn_queryReset" class="btn btn-default">&nbsp;重&nbsp;&nbsp;置</a>';e+='<a id="lr_btn_querySearch" class="btn btn-primary">&nbsp;查&nbsp;&nbsp;询</a>';e+="</div>";e+="</div>";d.html(e);d.find(".lr-query-formcontent").show();d.find(".lr-query-content").css({width:i||400,height:g||300});d.find(".lr-query-btn").on("click",function(){var j=d.find(".lr-query-content");if(j.hasClass("active")){j.removeClass("active")}else{j.addClass("active")}});d.find("#lr_btn_querySearch").on("click",function(){var j=d.find(".lr-query-content");var k=j.lrGetFormData();j.removeClass("active");h(k)});d.find("#lr_btn_queryReset").on("click",function(){var j=d.find(".lr-query-content");var l=j.lrGetFormData();for(var k in l){l[k]=""}j.lrSetFormData(l)});a(document).click(function(k){var l=k.target||k.srcElement;var j=a(l);if(!j.hasClass("lr-query-wrap")&&j.parents(".lr-query-wrap").length<=0){a(".lr-query-content").removeClass("active")}})}})(jQuery,top.learun);(function(a,j){var b=null;var d=["checkbox_0.png","checkbox_1.png","checkbox_2.png"];var h=top.$.rootUrl+"/Content/images/jfgrid/";var f=function(u,y,w,t,v,z){var q=z.left;var p=z.frozenleft;var r=0;var n=0;var o=false;if(y){q=y.left;r=y.top+28;n=y.deep+1;o=y.frozen}var s=0;var x=u.length;a.each(u,function(A,B){var C={data:B,height:28,width:B.width||100,top:r,left:q,frozen:o,deep:n,last:true,parent:y};if(!y&&B.frozen){C.frozen=true;C.left=p}w.push(C);if(B.children&&B.children.length>0){C.last=false;C.width=f(B.children,C,w,t,v,z)}else{z.MaxDeep=z.MaxDeep>C.deep?z.MaxDeep:C.deep;if(C.frozen){v.push(C)}else{t.push(C)}if(B.isMerge){z.mergeCols.push(C)}if(B.statistics){z.isStatistic=true}}if(!y){if(C.frozen){p+=C.width;z.frozenleft+=C.width}else{q+=C.width;z.left+=C.width}}else{q+=C.width}s+=C.width});return s};var k=function(n,p,o){n._width=n.width+p;if(o){n.$cell.css({width:n._width})}if(n.parent){k(n.parent,p)}};var m=function(n,t,s){var u=n.innerWidth();var q=t.running.headWidth+t.running.leftWidth;if(t.running.cols.length>0){var p=t.running.cols[t.running.cols.length-1];var o=0;var r=false;if(u>q){o=u-q+1;k(p,o,s);r=true}else{if(p._width!=undefined){o=1;k(p,o,s);r=true}}if(r){n.find("#jfgrid_head_col_"+t.id).css({width:(t.running.headWidth+o)});if(s){n.find("#jfgrid_body_"+t.id+">.lr-scroll-box").css({width:(t.running.headWidth+t.running.leftWidth+o-1)});n.find("#jfgrid_right_"+t.id).css({width:(t.running.headWidth+o-1)});n.find("#jfgrid_right_"+t.id+'>[colname="'+p.data.name+'"]').css({width:p._width})}}}};var e=function(x,r,t,u,s){if(x!==0){x=x||""}if(r.formatter){var w=r.formatter(x,t,s,u.$cell);u.text=a("<div>"+(w||"")+"</div>").text();u.$cell.attr("title",u.text);var n=u.$cell.find(".jfgrid-data-cell-expend");u.$cell.html(w);u.$cell.prepend(n);if(r.statistics){u.statisticsNum=u.statisticsNum||0;s.running.statisticData[r.name]=s.running.statisticData[r.name]||0;s.running.statisticData[r.name]+=(parseFloat(w||0)-u.statisticsNum);u.statisticsNum=parseFloat(w||0);a("#jfgrid_statistic_"+s.id+' [name="'+r.name+'"]').text(j.toDecimal(s.running.statisticData[r.name]))}n=null}else{if(r.formatterAsync){r.formatterAsync(function(z){u.text=a("<div>"+(z||"")+"</div>").text();u.$cell.attr("title",u.text);var y=u.$cell.find(".jfgrid-data-cell-expend");u.$cell.html(z);u.$cell.prepend(y);y=null;if(r.statistics){u.statisticsNum=u.statisticsNum||0;s.running.statisticData[r.name]=s.running.statisticData[r.name]||0;s.running.statisticData[r.name]+=(parseFloat(z||0)-u.statisticsNum);u.statisticsNum=parseFloat(z||0);a("#jfgrid_statistic_"+s.id+' [name="'+r.name+'"]').text(j.toDecimal(s.running.statisticData[r.name]))}},x,t,s,u.$cell)}else{if(r.edit){switch(r.edit.type){case"input":break;case"select":if(r.edit.op.data){a.each(r.edit.op.data,function(z,A){if(A[r.edit.op.value]==x){u.text=A[r.edit.op.text];u.$cell.attr("title",u.text);var y=u.$cell.find(".jfgrid-data-cell-expend");u.$cell.html(u.text);u.$cell.prepend(y);y=null;return false}});return}else{if(r.edit.datatype==="dataItem"){j.clientdata.getAsync("dataItem",{key:x,code:r.edit.code,rowItem:u,callback:function(z,A){A.rowItem.text=z.text;A.rowItem.$cell.attr("title",A.rowItem.text);var y=A.rowItem.$cell.find(".jfgrid-data-cell-expend");A.rowItem.$cell.html(A.rowItem.text);A.rowItem.$cell.prepend(y);y=null}});return}else{if(r.edit.datatype==="dataSource"){j.clientdata.getAsync("sourceData",{key:x,keyId:r.edit.op.value,code:r.edit.code,rowItem:u,callback:function(z,A){A.rowItem.text=z[r.edit.op.text];A.rowItem.$cell.attr("title",A.rowItem.text);var y=A.rowItem.$cell.find(".jfgrid-data-cell-expend");A.rowItem.$cell.html(A.rowItem.text);A.rowItem.$cell.prepend(y);y=null}});return}}}break;case"radio":if(r.edit.data){a.each(r.edit.data,function(z,A){if(A.id==x){u.text=A.text;u.$cell.attr("title",u.text);var y=u.$cell.find(".jfgrid-data-cell-expend");u.$cell.html(u.text);u.$cell.prepend(y);y=null;return false}});return}else{if(r.edit.datatype==="dataItem"){j.clientdata.getAsync("dataItem",{key:x,code:r.edit.code,rowItem:u,callback:function(z,A){A.rowItem.text=z.text;A.rowItem.$cell.attr("title",A.rowItem.text);var y=A.rowItem.$cell.find(".jfgrid-data-cell-expend");A.rowItem.$cell.html(A.rowItem.text);A.rowItem.$cell.prepend(y);y=null}});return}else{if(r.edit.datatype==="dataSource"){j.clientdata.getAsync("sourceData",{key:x,keyText:r.edit.op.text,keyId:r.edit.op.value,code:r.edit.code,rowItem:u,callback:function(z,A){A.rowItem.text=z[A.keyText];A.rowItem.$cell.attr("title",A.rowItem.text);var y=A.rowItem.$cell.find(".jfgrid-data-cell-expend");A.rowItem.$cell.html(A.rowItem.text);A.rowItem.$cell.prepend(y);y=null}});return}}}break;case"checkbox":if(x!=undefined&&x!=null&&x!=""){if(r.edit.data){x=x+"";var p=x.split(",");var q={};a.each(p,function(y,z){q[z]="1"});var o=[];a.each(r.edit.data,function(y,z){if(q[z.id]=="1"){o.push(z.text)}});u.text=String(o);u.$cell.attr("title",u.text);var n=u.$cell.find(".jfgrid-data-cell-expend");u.$cell.html(u.text);u.$cell.prepend(n);n=null;return}else{if(r.edit.datatype==="dataItem"){j.clientdata.getAllAsync("dataItem",{code:r.edit.code,rowItem:u,value:x,callback:function(z,A){var C=A.value.split(",");var D={};a.each(C,function(E,F){D[F]="1"});var B=[];a.each(z,function(E,F){if(D[F.value]=="1"){B.push(F.text)}});A.rowItem.text=String(B);A.rowItem.$cell.attr("title",A.rowItem.text);var y=A.rowItem.$cell.find(".jfgrid-data-cell-expend");A.rowItem.$cell.html(A.rowItem.text);A.rowItem.$cell.prepend(y);y=null}});return}else{if(r.edit.datatype==="dataSource"){j.clientdata.getAllAsync("sourceData",{value:x,keyId:r.edit.op.value,keyText:r.edit.op.text,code:r.edit.code,rowItem:u,callback:function(z,A){var C=A.value.split(",");var D={};a.each(C,function(E,F){D[F]="1"});var B=[];a.each(z,function(E,F){if(D[F[A.keyId]]=="1"){B.push(F[A.keyText])}});A.rowItem.text=String(B);A.rowItem.$cell.attr("title",A.rowItem.text);var y=A.rowItem.$cell.find(".jfgrid-data-cell-expend");A.rowItem.$cell.html(A.rowItem.text);A.rowItem.$cell.prepend(y);y=null}});return}}}}break;case"datatime":if(r.edit.dateformat=="0"){x=j.formatDate(x,"yyyy-MM-dd");t[r.name]=x}break;case"layer":var v=u.$cell.attr("rowindex");var n=u.$cell.find(".jfgrid-data-cell-expend");u.text=x;u.$cell.attr("title",u.text);u.$cell.html((x||"")+'<i class="fa fa-ellipsis-h" value="'+v+'" ></i>');u.$cell.prepend(n);u.$cell.find(".fa-ellipsis-h")[0].op=r;u.$cell.find(".fa-ellipsis-h")[0].row=t;if(r.isRead!="1"){u.$cell.find(".fa-ellipsis-h").on("click",function(){var y=a(this);var A=y[0].op;var z=y[0].row;var B=y.attr("value");A.edit.init&&A.edit.init(z,y.parent(),B);top.lrGirdLayerEdit=A;top.lrGirdLayerEditCallBack=function(C){A.edit.change&&A.edit.change(z,B,C);top.lrGirdLayerEdit=null;top.lrGirdLayerEditCallBack=null};if(r.edit.op){j.layerForm({id:"lrgridlayerform",title:"选择"+r.label,url:top.$.rootUrl+"/Utility/JfGirdLayerForm",height:r.edit.op.height||400,width:r.edit.op.width||600,callBack:function(C){var D=top[C].acceptClick(function(E){A.edit.change&&A.edit.change(z,B,E)});top.lrGirdLayerEdit=null;return D}})}return false})}return;break}}var n=u.$cell.find(".jfgrid-data-cell-expend");u.text=x;u.$cell.attr("title",u.text);u.$cell.html(u.text);u.$cell.prepend(n);if(r.statistics){u.statisticsNum=u.statisticsNum||0;s.running.statisticData[r.name]=s.running.statisticData[r.name]||0;s.running.statisticData[r.name]+=(parseFloat(u.text||0)-u.statisticsNum);u.statisticsNum=parseFloat(u.text||0);a("#jfgrid_statistic_"+s.id+' [name="'+r.name+'"]').text(j.toDecimal(s.running.statisticData[r.name]))}n=null}}};var l=function(n,o){n.width=n.width+o;n.$cell.css({width:n.width});if(n.parent){l(n.parent,o)}};var i=function(n,q,o){switch(o.data.edit.type){case"input":o.$edit=a('<div class="jfgrid-edit-cell"><input id="jfgrid_edit_'+q.id+"_"+o.data.name+'" /></div>');if(o.frozen){n.find("#jfgrid_left_"+q.id).append(o.$edit)}else{n.find("#jfgrid_right_"+q.id).append(o.$edit)}o.$edit.on("keypress",function(r){if(event.keyCode=="13"){g()}});break;case"select":o.$edit=a('<div class="jfgrid-edit-cell"><div id="jfgrid_edit_'+q.id+"_"+o.data.name+'" ></div></div>');if(o.frozen){n.find("#jfgrid_left_"+q.id).append(o.$edit)}else{n.find("#jfgrid_right_"+q.id).append(o.$edit)}o.data.edit.op=o.data.edit.op||{};o.$edit.find("div").lrselect(o.data.edit.op);o.data.edit.op.value=o.$edit.find("div")[0]._lrselect.dfop.value;o.data.edit.op.text=o.$edit.find("div")[0]._lrselect.dfop.text;if(o.data.edit.datatype=="dataItem"){j.clientdata.getAllAsync("dataItem",{code:o.data.edit.code,callback:function(r){var s=[];a.each(r,function(t,u){s.push({id:u.value,text:u.text,title:u.text,k:t})});o.$edit.find("div").lrselectRefresh({data:s})}})}else{if(o.data.edit.datatype=="dataSource"){j.clientdata.getAllAsync("sourceData",{code:o.data.edit.code,callback:function(r){o.$edit.find("div").lrselectRefresh({data:r})}})}}break;case"radio":o.$edit=a('<div class="jfgrid-edit-cell"><div id="jfgrid_edit_'+q.id+"_"+o.data.name+'" class="radio"  ></div></div>');if(o.frozen){n.find("#jfgrid_left_"+q.id).append(o.$edit)}else{n.find("#jfgrid_right_"+q.id).append(o.$edit)}if(o.data.edit.datatype=="dataItem"){o.$edit.find("div").lrRadioCheckbox({type:"radio",code:o.data.edit.code})}else{if(o.data.edit.datatype=="dataSource"){o.$edit.find("div").lrRadioCheckbox({type:"radio",dataType:"dataSource",code:o.data.edit.code,text:o.data.edit.text,value:o.data.edit.value})}else{a.each(o.data.edit.data||[],function(s,t){var r=a('<label><input name="jfgrid_edit_'+q.id+"_"+o.data.name+'" value="'+t.id+'"'+(o.data.edit.dfvalue==t.id?"checked":"")+' type="radio">'+t.text+"</label>");o.$edit.find("div").append(r)})}}break;case"checkbox":o.$edit=a('<div class="jfgrid-edit-cell"><div id="jfgrid_edit_'+q.id+"_"+o.data.name+'" class="checkbox"  ></div></div>');if(o.frozen){n.find("#jfgrid_left_"+q.id).append(o.$edit)}else{n.find("#jfgrid_right_"+q.id).append(o.$edit)}if(o.data.edit.datatype=="dataItem"){o.$edit.find("div").lrRadioCheckbox({type:"checkbox",code:o.data.edit.code})}else{if(o.data.edit.datatype=="dataSource"){o.$edit.find("div").lrRadioCheckbox({type:"checkbox",dataType:"dataSource",code:o.data.edit.code,text:o.data.edit.text,value:o.data.edit.value})}else{a.each(o.data.edit.data||[],function(s,t){var r=a('<label><input name="jfgrid_edit_'+q.id+"_"+o.data.name+'" value="'+t.id+'"'+(o.data.edit.dfvalue==t.id?"checked":"")+' type="checkbox">'+t.text+"</label>");o.$edit.find("div").append(r)})}}break;case"datatime":var p=o.data.edit.dateformat=="0"?"yyyy-MM-dd":"yyyy-MM-dd HH:mm";o.$edit=a('<div class="jfgrid-edit-cell"><input id="jfgrid_edit_'+q.id+"_"+o.data.name+'" onClick="WdatePicker({dateFmt:\''+p+"',qsEnabled:false,isShowClear:false,isShowOK:false,isShowToday:false,onpicked:function(){$('#jfgrid_edit_"+q.id+"_"+o.data.name+'\').trigger(\'change\');}})"  type="text" class="form-control" /></div>');if(o.frozen){n.find("#jfgrid_left_"+q.id).append(o.$edit)}else{n.find("#jfgrid_right_"+q.id).append(o.$edit)}o.$edit.on("keypress",function(r){if(event.keyCode=="13"){g()}});break;case"layer":break}};var g=function(){a(".jfgrid-layout .jfgrid-edit-cell ").hide();a(".jfgrid-layout .lr-select-option").slideUp(150);a(".jfgrid-layout .lr-select").removeClass("lr-select-focus")};var c={init:function(n,o){if(o.url==""||o.url==null||o.url==undefined){o.isPage=false}n.html("");n.addClass("jfgrid-layout");if(b===null){b=a('<div style="position: fixed;top: 0;left: 0;width: 100%;height: 100%;z-index: 9999;cursor: col-resize;display: none;" ></div>');a("body").append(b)}c.layout(n,o);c.bind(n,o);c.head(n,o);c.dataRender(n,o,o.rowdatas);o=null},layout:function(t,v){if(v.height!=undefined&&v.height!=null&&v.height>0){t.css({height:v.height})}var q=a('<div class="jfgrid-head" id="jfgrid_head_'+v.id+'" ></div>');q.append('<div class="jfgrid-border" id="jfgrid_border_'+v.id+'" ></div>');q.append('<div class="jfgrid-head-col" id="jfgrid_head_col_'+v.id+'" ></div>');t.append(q);var o=a('<div class="jfgrid-body" id="jfgrid_body_'+v.id+'" ></div>');o.append('<div class="jfgrid-left" id="jfgrid_left_'+v.id+'" ></div>');o.append('<div class="jfgrid-right" id="jfgrid_right_'+v.id+'" ></div>');t.append(o);var p=a('<div class="jfgrid-footer" id="jfgrid_footer_'+v.id+'" ></div>');t.append(p);t.append('<div class="jfgrid-move-line" id="jfgrid_move_line_'+v.id+'"  ></div>');o.lrscroll(function(w,z){if(!t.is(":hidden")){t.find("#jfgrid_left_"+v.id).css("left",w);t.find("#jfgrid_head_col_"+v.id).css("left",v.running.leftWidth-w);if(v.running.isStatistic){t.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-right").css("left",-w)}g()}});t.find("#jfgrid_body_"+v.id).append('<div class="jfgrid-nodata-img" id="jfgrid_nodata_img_'+v.id+'"  ><img src="'+top.$.rootUrl+'/Content/images/jfgrid/nodata.jpg"></div>');if(v.isPage){t.css({"padding-bottom":"35px"});var s=a('<div class="jfgrid-page-bar" id="jfgrid_page_bar_'+v.id+'"><div class="jfgrid-page-bar-info" >无显示数据</div>                <div class="paginations" id="jfgrid_page_bar_nums_'+v.id+'" style="display:none;" >                <ul class="pagination pagination-sm"><li><a href="javascript:void(0);" class="pagebtn">首页</a></li></ul>                <ul class="pagination pagination-sm"><li><a href="javascript:void(0);" class="pagebtn">上一页</a></li></ul>                <ul class="pagination pagination-sm" id="jfgrid_page_bar_num_'+v.id+'" ></ul>                <ul class="pagination pagination-sm"><li><a href="javascript:void(0);" class="pagebtn">下一页</a></li></ul>                <ul class="pagination pagination-sm"><li><a href="javascript:void(0);" class="pagebtn">尾页</a></li></ul>                <ul class="pagination"><li><span></span></li></ul>                <ul class="pagination"><li><input type="text" class="form-control"></li></ul>                <ul class="pagination pagination-sm"><li><a href="javascript:void(0);" class="pagebtn">跳转</a></li></ul>                </div></div>');p.append(s);s.find("#jfgrid_page_bar_num_"+v.id).on("click",c.turnPage);s.find("#jfgrid_page_bar_nums_"+v.id+" .pagebtn").on("click",{op:v},c.turnPage2);s=null}else{if(v.isEdit){t.css({"padding-bottom":"29px"});var u=a('<div class="jfgrid-toolbar" id="jfgrid_toolbar_'+v.id+'"></div>');var n=a('<span><i class="fa fa-plus"></i></span>');var r=a('<span><i class="fa fa-minus"></i></span>');n.on("click",function(){var w={};v.rowdatas.push(w);v.onAddRow&&v.onAddRow(w,v.rowdatas);if(v.isTree){c.rowRender(t,v,{data:w,childRows:[]},0,1)}else{c.rowRender(t,v,w,0)}t.find("#jfgrid_nodata_img_"+v.id).hide()});r.on("click",function(){var x=false;var y=true;if(v.isMultiselect){var w=[];a.each(v.running.rowdata,function(z,A){if(A.jfcheck.value==1){y=true;if(v.beforeMinusRow){y=v.beforeMinusRow(A.jfgridRowData)}if(y){v.rowdatas.splice(v.rowdatas.indexOf(A.jfgridRowData),1);w.push(A.jfgridRowData);x=true}}});if(x){v.onMinusRow&&v.onMinusRow(w,v.rowdatas)}}else{if(v.running.rowSelected!=null){y=true;if(v.beforeMinusRow){y=v.beforeMinusRow(v.running.rowSelected.jfgridRowData)}if(y){v.rowdatas.splice((v.running.rowSelected.jfnum.value-1),1);x=true;v.onMinusRow&&v.onMinusRow(v.running.rowSelected,v.rowdatas);v.running.rowSelected=null}}}if(x){c.dataRender(t,v,v.rowdatas)}if(v.running.rowdata.length==0){t.find("#jfgrid_nodata_img_"+v.id).show()}});u.append(n);u.append(r);p.append(u);u=null}}q=null;o=null;p=null},bind:function(n,o){n.on("click",function(r){var q=a(this);var t=q[0].dfop;var s=r.target||r.srcElement;var p=a(s);if(!p.hasClass("jfgrid-edit-cell")&&p.parents(".jfgrid-edit-cell").length==0){g()}if(t.running.isWidhChanging){dfop.isWidhChanging=false}else{if(p.hasClass("jfgrid-head-cell")||p.parents(".jfgrid-head-cell").length>0){if(!p.hasClass("jfgrid-head-cell")){p=p.parents(".jfgrid-head-cell")}c.sortCol(q,p,t)}else{if(p.attr("colname")=="jfgrid_subGrid"||p.parent().attr("colname")=="jfgrid_subGrid"){c.expandSub(q,p,t)}else{if(p.parent().hasClass("jfgrid-data-cell-expend")){c.expandTree(p,t)}else{if(p.hasClass("jfgrid-data-cell")||p.parents(".jfgrid-data-cell").length>0){c.clickRow(q,p,t);r.stopPropagation()}else{if(p.attr("id")==("jfgrid_all_cb_"+t.id)){c.checkAllRows(q,p,t)}}}}}}});n.on("dblclick",function(r){var q=a(this);var t=q[0].dfop;var s=r.target||r.srcElement;var p=a(s);if(p.hasClass("jfgrid-data-cell")||p.parents(".jfgrid-data-cell").length>0){t.dblclick&&t.dblclick(t.running.rowSelected.jfgridRowData)}});n.on("mouseover",function(r){var q=a(this);q.find(".jfgrid-data-cell-over").removeClass("jfgrid-data-cell-over");var s=r.target||r.srcElement;var p=a(s);if(p.hasClass("jfgrid-data-cell")||p.parents(".jfgrid-data-cell").length>0){var t=p.attr("rownum");if(!t){t=p.parents(".jfgrid-data-cell").attr("rownum")}q.find('[rownum="'+t+'"]').addClass("jfgrid-data-cell-over")}});n.resize(function(){var p=a(this);var q=p[0].dfop;m(p,q,true);var r=p.find("#jfgrid_body_"+q.id).width();p.find(".jfgrid-sub").css({width:r})});n.delegate(".jfgrid-heed-move","mousedown",{op:o},function(r){b.show();var s=r.data.op;s.running.moveing=true;s.running.xMousedown=r.pageX;var p=a("#jfgrid_move_line_"+s.id);var t=parseInt(a(this).parent().attr("path"));var q=s.running.headData[t];s.running.moveCol=q;s.running.moveWidth=q._width||q.width;s.running.moveLineLeft=q.left+s.running.moveWidth+s.running.leftWidth;if(q.frozen){s.running.moveLineLeft=s.running.moveLineLeft-s.running.frozenleft}p.css({left:s.running.moveLineLeft}).show()});top.$(document).on("mousemove",{$obj:n},function(q){var s=q.data.$obj[0].dfop;var u=q.pageX;if(s.running.moveing){var p=q.data.$obj.find("#jfgrid_move_line_"+s.id);var t=s.running.moveWidth+(u-s.running.xMousedown);t=(t<40?40:t);var r=s.running.moveLineLeft+(t-s.running.moveWidth);p.css({left:r})}}).on("mouseup",{$obj:n},function(s){var v=s.data.$obj[0].dfop;if(v.running.moveing){v.running.moveing=false;var z=s.pageX;if(v.running.moveCol){var y=v.running.moveWidth+(z-v.running.xMousedown);y=(y<40?40:y);var q=y-v.running.moveWidth;if(q!=0){l(v.running.moveCol,q);if(v.running.moveCol.frozen){v.running.frozenleft+=q;v.running.leftWidth+=q;s.data.$obj.find("#jfgrid_head_"+v.id).css({"padding-left":v.running.leftWidth});s.data.$obj.find("#jfgrid_border_"+v.id).css({width:v.running.leftWidth});s.data.$obj.find("#jfgrid_head_col_"+v.id).css({left:v.running.leftWidth});s.data.$obj.find("#jfgrid_body_"+v.id+">.lr-scroll-box").css({"padding-left":v.running.leftWidth});s.data.$obj.find("#jfgrid_left_"+v.id).css({width:v.running.leftWidth});s.data.$obj.find("#jfgrid_left_"+v.id+'>[colname="'+v.running.moveCol.data.name+'"]').css({width:v.running.moveCol.width});if(v.running.isStatistic){s.data.$obj.find("#jfgrid_statistic_"+v.id).css({"padding-left":v.running.leftWidth});s.data.$obj.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-left").css({width:v.running.leftWidth});s.data.$obj.find("#jfgrid_statistic_"+v.id+' [name="'+v.running.moveCol.data.name+'"]').css({width:v.running.moveCol.width})}}else{v.running.headWidth+=q;v.running.left+=q;s.data.$obj.find("#jfgrid_head_col_"+v.id).css({width:v.running.headWidth});s.data.$obj.find("#jfgrid_right_"+v.id).css({width:v.running.headWidth});s.data.$obj.find("#jfgrid_right_"+v.id+'>[colname="'+v.running.moveCol.data.name+'"]').css({width:v.running.moveCol.width});if(v.running.isStatistic){s.data.$obj.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-right").css({width:v.running.headWidth});s.data.$obj.find("#jfgrid_statistic_"+v.id+' [name="'+v.running.moveCol.data.name+'"]').css({width:v.running.moveCol.width})}}var w=parseInt(v.running.moveCol.$cell.attr("path"));for(var t=w+1,u=v.running.headData.length;t<u;t++){var r=v.running.headData[t];if(r.frozen&&v.running.moveCol.frozen){r.left+=q;r.$cell.css({left:r.left+v.running.leftWidth-v.running.frozenleft});s.data.$obj.find("#jfgrid_left_"+v.id+'>[colname="'+r.data.name+'"]').css({left:r.left+v.running.leftWidth-v.running.frozenleft});if(v.running.isStatistic){s.data.$obj.find("#jfgrid_statistic_"+v.id+' [name="'+r.data.name+'"]').css({left:r.left+v.running.leftWidth-v.running.frozenleft})}}else{if(!r.frozen&&!v.running.moveCol.frozen){r.left+=q;r.$cell.css({left:r.left});s.data.$obj.find("#jfgrid_right_"+v.id+'>[colname="'+r.data.name+'"]').css({left:r.left});if(v.running.isStatistic){s.data.$obj.find("#jfgrid_statistic_"+v.id+' [name="'+r.data.name+'"]').css({left:r.left})}}}}m(s.data.$obj,v,true)}v.running.moveCol=null}b.hide();var p=s.data.$obj.find("#jfgrid_move_line_"+v.id);p.hide()}})},head:function(q,v){v.running.MaxDeep=0;v.running.headWidth=0;v.running.headHeight=0;v.running.leftWidth=0;v.running.left=0;v.running.frozenleft=0;v.running.cols=[];v.running.frozenCols=[];v.running.mergeCols||[];v.running.headData=[];f(v.headData,false,v.running.headData,v.running.cols,v.running.frozenCols,v.running);if(v.running.isStatistic){v.running.statisticData={};q.find("#jfgrid_footer_"+v.id).append('<div class="jfgrid-statistic" id="jfgrid_statistic_'+v.id+'"><div class="jfgrid-statistic-left"></div><div class="jfgrid-statistic-right" ></div></div>');if(v.isPage){q.find("#jfgrid_footer_"+v.id).css({height:64,"padding-top":"29px"});q.css({"padding-bottom":"64px"})}else{q.find("#jfgrid_footer_"+v.id).css({height:29});q.css({"padding-bottom":"29px"})}q.find("#jfgrid_toolbar_"+v.id).css({width:"50px"})}else{if(v.isEdit){q.find("#jfgrid_toolbar_"+v.id).css({width:"100%"})}}v.running.headHeight=v.running.MaxDeep*28+28;v.running.headWidth=v.running.left;var n=q.find("#jfgrid_border_"+v.id);var p=q.find("#jfgrid_head_col_"+v.id);if(v.isShowNum){n.append('<div class="jfgrid-border-cell jfgrid-border-num" style="width:'+v.numRowWitdh+'px;" ></div>');v.running.leftWidth+=v.numRowWitdh}if(v.isMultiselect){var o=a('<div class="jfgrid-border-cell jfgrid-border-cb"><img  id="jfgrid_all_cb_'+v.id+'" src="'+h+d[0]+'" /></div>').css({left:v.running.leftWidth,"line-height":(v.running.headHeight-1)+"px"});n.append(o);v.running.leftWidth+=30}if(v.isSubGrid){var s=a('<div class="jfgrid-border-cell jfgrid-border-sub"></div>').css("left",v.running.leftWidth);n.append(s);v.running.leftWidth+=30}v.running.leftWidth+=v.running.frozenleft;q.css({"padding-top":v.running.headHeight});q.find("#jfgrid_head_"+v.id).css({"padding-top":v.running.headHeight});n.css({width:v.running.leftWidth,height:v.running.headHeight});p.css({width:v.running.headWidth,height:v.running.headHeight,left:v.running.leftWidth});q.find("#jfgrid_body_"+v.id+">.lr-scroll-box").css({"padding-left":v.running.leftWidth});q.find("#jfgrid_left_"+v.id).css({width:v.running.leftWidth});m(q,v,false);if(v.running.isStatistic){q.find("#jfgrid_statistic_"+v.id).css({"padding-left":v.running.leftWidth});q.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-left").css({width:v.running.leftWidth})}var t=0;var r=null;var u=true;a.each(v.running.headData,function(w,x){if(x.last){x.height=x.height+(v.running.MaxDeep-x.deep)*28}x.data.height=x.height;x.$cell=a('<div class="jfgrid-head-cell" path="'+w+'"  ><span>'+(x.data.label||"")+"</span></div>").css({top:x.top,left:x.left,width:(x._width||x.width),height:x.height,"line-height":(x.height-1)+"px","text-align":(x.data.align||"left")});j.language.get((x.data.label||""),function(y){x.data.label=y;x.$cell.find("span").text(y)});if(x.last){x.$cell.append('<div class="jfgrid-heed-sort"><i class="fa fa-caret-up"></i><i class="fa fa-caret-down"></i></div>');x.$cell.append('<div class="jfgrid-heed-move"></div>');if(x.data.edit){i(q,v,x)}if(!x.frozen){t+=(x._width||x.width)}if(v.running.isStatistic){if(x.data.statistics&&u&&r!=null){r.attr("isText","1");r.css({"text-align":"right"});r.text("合计：");u=false}r=a('<div class="jfGird-statistic-cell"  name="'+x.data.name+'" ></div>').css({width:(x._width||x.width),"text-align":(x.data.align||"left"),left:x.left});if(x.frozen){r.css({left:(x.left+v.running.leftWidth-v.running.frozenleft)});q.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-left").append(r)}else{q.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-right").append(r)}}}if(x.frozen){x.$cell.css({left:(x.left+v.running.leftWidth-v.running.frozenleft)});n.append(x.$cell)}else{p.append(x.$cell)}});q.find("#jfgrid_right_"+v.id).parent().css({width:v.running.leftWidth+t-1});q.find("#jfgrid_right_"+v.id).css({width:t-1});if(v.running.isStatistic){q.find("#jfgrid_statistic_"+v.id+">.jfgrid-statistic-right").css({width:t-1})}},dataRender:function(q,B,w,t){t=t||0;B.running.rowdata=[];B.running.statisticData={};q.hide();q.find("#jfgrid_left_"+B.id).find(".jfgrid-data-cell").remove();q.find("#jfgrid_right_"+B.id).find(".jfgrid-data-cell").remove();q.find("#jfgrid_left_"+B.id).find(".jfgrid-sub").remove();g();var A=3;if(B.isTree){var E=c.listTotree(w,B);if(E.length>0){r(E,1)}else{}function r(F,G){a.each(F,function(H,I){c.rowRender(q,B,I,t,G);if(I.childRows.length>0){r(I.childRows,G+1)}})}}else{a.each(w,function(F,G){c.rowRender(q,B,G,t);if(B.multiselectfield&&G[B.multiselectfield]==1){if(A==0){A=2}else{if(A==3){A=1}}}else{if(B.multiselectfield&&G[B.multiselectfield]==0){if(A==1){A=2}else{if(A==3){A=0}}}}});if(B.isPage){var n=a("#jfgrid_page_bar_"+B.id);var o=n.find("#jfgrid_page_bar_num_"+B.id);var p=n.find("#jfgrid_page_bar_nums_"+B.id);var C="";var v="";if(B.rowdatas.length==0){C="无显示数据"}else{var D=B.running.pageparam;var s=(D.page-1)*D.rows+1;var x=s+B.rowdatas.length-1;C="显示第 "+s+" - "+x+" 条记录  <span>|</span> 检索到 "+D.records+" 条记录";if(D.total>1){var u=D.page-6;u=u<0?0:u;var y=u+10;if(y>D.total){y=D.total}if((y-u)<10){u=y-10}u=u<0?0:u;for(var z=u;z<y;z++){v+='<li><a href="javascript:void(0);" class=" pagebtn '+((z+1)==D.page?"active":"")+'" >'+(z+1)+"</a></li>"}p.find("span").text("共"+D.total+"页,到");p.show()}else{p.hide()}}o.html(v);n.find(".jfgrid-page-bar-info").html(C)}}if(B.isMultiselect){if(A==2||A==1){q.find("#jfgrid_all_cb_"+B.id).attr("src",h+d[A])}else{q.find("#jfgrid_all_cb_"+B.id).attr("src",h+d[0])}}if(B.running.rowdata.length>0){q.find("#jfgrid_nodata_img_"+B.id).hide()}else{q.find("#jfgrid_nodata_img_"+B.id).show()}q.show()},rowRender:function(q,B,t,y,z){var A=null;var D=B.running.rowdata;y=y||0;var o=q.find("#jfgrid_left_"+B.id);var p=q.find("#jfgrid_right_"+B.id);var s=D.length;var x=s*B.rowHeight;var u=0;var C={};var n=null;if(B.isTree){C.jfgridRowData=t.data;C.childRows=t.childRows;C.jfdeep=z;t=t.data;n=a('<div class="jfgrid-data-cell-expend" style="width:'+(z*16)+'px;" ></div>');if(C.childRows.length>0){n.append('<i class="fa fa-caret-down jfgrid-data-cell-expendi"></i>')}B.rowdatas[s]=t}else{C.jfgridRowData=t}C.jfnum={top:x,left:u,value:s+1,text:s+y*(B.isPage?B.running.pageparam.rows:1)+1};if(B.isShowNum){C.jfnum.$cell=a('<div class="jfgrid-data-cell" rowindex="'+s+'" rownum="'+B.id+"_"+s+'" colname="jfgrid_num"  >'+(s+y*(B.isPage?B.running.pageparam.rows:1)+1)+"</div>");C.jfnum.$cell.css({width:B.numRowWitdh,top:C.jfnum.top,left:C.jfnum.left,"text-align":"center",height:B.rowHeight,"line-height":(B.rowHeight-1)+"px"});o.append(C.jfnum.$cell);u+=B.numRowWitdh}if(B.isMultiselect){var r=B.multiselectfield||"jfcheck";C.jfcheck={top:x,left:u,value:t[r]||0,$cell:a('<div class="jfgrid-data-cell" rowindex="'+s+'" rownum="'+B.id+"_"+s+'" colname="jfgrid_check"  ><img src="'+h+d[0]+'" /></div>')};if(C.jfcheck.value+""=="1"){C.jfcheck.$cell.find("img").attr("src",h+d[1])}C.jfcheck.$cell.css({top:C.jfcheck.top,left:C.jfcheck.left,"text-align":"center",height:B.rowHeight,"line-height":(B.rowHeight-1)+"px"});o.append(C.jfcheck.$cell);u+=30}if(B.isSubGrid){C.jfsubGrid={top:x,left:u,value:false,$cell:a('<div class="jfgrid-data-cell"  rowindex="'+s+'"  rownum="'+B.id+"_"+s+'" colname="jfgrid_subGrid"  ><i class="fa fa-plus" ></i></div>')};C.jfsubGrid.$cell.css({top:C.jfsubGrid.top,left:C.jfsubGrid.left,"text-align":"center",height:B.rowHeight,"line-height":(B.rowHeight-1)+"px"});o.append(C.jfsubGrid.$cell);u+=30}a.each(B.running.frozenCols,function(E,G){var H=t[G.data.name];var F=(G._width||G.width);C[G.data.name]={top:x,left:u,value:H,$cell:a('<div class="jfgrid-data-cell" rowindex="'+s+'" rownum="'+B.id+"_"+s+'" colname="'+G.data.name+'"  ></div>')};e(H,G.data,t,C[G.data.name],B);C[G.data.name].$cell.css({top:C[G.data.name].top,left:C[G.data.name].left,"text-align":G.data.align,width:F,height:B.rowHeight,"line-height":(B.rowHeight-1)+"px"});o.append(C[G.data.name].$cell);u+=F;if(n!=null&&E==0){C[G.data.name].$cell.prepend(n)}A=C[G.data.name]});u=0;a.each(B.running.cols,function(E,G){var H=t[G.data.name];var F=(G._width||G.width);C[G.data.name]={top:x,left:u,value:H,$cell:a('<div class="jfgrid-data-cell" rowindex="'+s+'" rownum="'+B.id+"_"+s+'" colname="'+G.data.name+'"  ></div>')};e(H,G.data,t,C[G.data.name],B);C[G.data.name].$cell.css({top:C[G.data.name].top,left:C[G.data.name].left,"text-align":G.data.align,width:F,height:B.rowHeight,"line-height":(B.rowHeight-1)+"px"});p.append(C[G.data.name].$cell);u+=F;if(n!=null&&E==0&&B.running.frozenCols.length==0){C[G.data.name].$cell.prepend(n)}A=C[G.data.name]});D.push(C);p.css({height:x+B.rowHeight-1});if(B.isAutoHeight){var w=q.css("padding-top");var v=q.css("padding-bottom");q.css({height:x+B.rowHeight+parseInt(w)+parseInt(v)+1})}if(B.running.rowSelected&&A){if(B.running.rowSelected.jfgridRowData[B.mainId]){B.running.rowSelected.jfgridRowData[B.mainId]==C.jfgridRowData[B.mainId]&&(A.$cell.trigger("click"))}else{B.running.rowSelected.jfnum.value==C.jfnum.value&&(A.$cell.trigger("click"))}}},updateRow:function(p,o){var n={};a.each(o.running.headData,function(r,q){n[q.data.name]=q.data});a.each(p,function(r,q){if(r!="jfnum"&&r!="jfcheck"&&r!="jfsubGrid"&&r!="jfgridRowData"){if(q.value!=p.jfgridRowData[r]){q.value=p.jfgridRowData[r]||"";e(q.value,n[r],p.jfgridRowData,q,o)}}})},reload:function(n,p){p.rowdatas=[];if(p.isPage){j.loading(true,"正在获取数据");p.running.pageparam=p.running.pageparam||{rows:100,page:1,sidx:"",sord:"",records:0,total:0};p.running.pageparam.rows=p.rows;p.running.pageparam.sidx=p.sidx;p.running.pageparam.sord=p.sord;p.running.pageparam.page=p.running.pageparam.page||1;p.running.pageparam.records=0;p.running.pageparam.total=0;p.param=p.param||{};delete p.param.pagination;var o=JSON.stringify(p.param);if(p.running.paramString!=o){p.running.paramString=o;p.running.pageparam.page=1}p.param.pagination=JSON.stringify(p.running.pageparam);j.httpAsync("GET",p.url,p.param,function(q){j.loading(false);if(q){p.rowdatas=q.rows;p.running.pageparam.page=q.page;p.running.pageparam.records=q.records;p.running.pageparam.total=q.total}else{p.rowdatas=[];p.running.pageparam.page=1;p.running.pageparam.records=0;p.running.pageparam.total=0}p.onRenderBefore&&p.onRenderBefore(p.rowdatas);c.dataRender(n,p,p.rowdatas,(p.running.pageparam.page-1));p.onRenderComplete&&p.onRenderComplete(p.rowdatas)})}else{j.loading(true,"正在获取数据");j.httpAsync("GET",p.url,p.param,function(q){j.loading(false);p.rowdatas=q||[];p.onRenderBefore&&p.onRenderBefore(p.rowdatas);c.dataRender(n,p,p.rowdatas,0);p.onRenderComplete&&p.onRenderComplete(p.rowdatas)})}},listTotree:function(o,v){var x=[];var t={};var u={};var w={};o=o||[];for(var p=0,s=o.length;p<s;p++){var r=o[p];u[r[v.mainId]]=1;t[r[v.parentId]]=t[r[v.parentId]]||[];t[r[v.parentId]].push(r);if(u[r[v.parentId]]==1){delete w[r[v.parentId]]}else{w[r[v.parentId]]=1}if(w[r[v.mainId]]==1){delete w[r[v.mainId]]}}for(var q in w){n(x,q)}function n(y,D){var C=t[D]||[];for(var A=0,B=C.length;A<B;A++){var z={data:C[A],childRows:[]};n(z.childRows,C[A][v.mainId]);y.push(z)}}return x},expandTree:function(n,t){var o=0;var q=false;var w=n.parents(".jfgrid-data-cell").attr("rownum");var u=parseInt(w.replace(t.id+"_",""));var v=t.running.rowdata[u];if(n.hasClass("fa-caret-down")){v.lrClosedRows={};for(var r=u+1,s=t.running.rowdata.length;r<s;r++){var p=t.running.rowdata[r];if(p.jfdeep>v.jfdeep&&!q){if(!a('[rownum="'+t.id+"_"+r+'"]').is(":hidden")){o+=t.rowHeight;a('[rownum="'+t.id+"_"+r+'"]').hide();v.lrClosedRows[r]="1"}}else{q=true;var x=parseInt(a('[rownum="'+t.id+"_"+r+'"]').eq(0).css("top").replace("px",""))-o;a('[rownum="'+t.id+"_"+r+'"]').css({top:x})}}n.removeClass("fa-caret-down");n.addClass("fa-caret-right")}else{for(var r=u+1,s=t.running.rowdata.length;r<s;r++){var p=t.running.rowdata[r];if(p.jfdeep>v.jfdeep&&!q){if(v.lrClosedRows[r]){o+=t.rowHeight;a('[rownum="'+t.id+"_"+r+'"]').show()}}else{q=true;var x=parseInt(a('[rownum="'+t.id+"_"+r+'"]').eq(0).css("top").replace("px",""))+o;a('[rownum="'+t.id+"_"+r+'"]').css({top:x})}}n.removeClass("fa-caret-right");n.addClass("fa-caret-down")}a("#jfgrid_left_"+t.id+" .jfgrid-selected,#jfgrid_right_"+t.id+" .jfgrid-selected").removeClass("jfgrid-selected");t.running.rowSelected=null},sortCol:function(p,n,s){var t=n.attr("path");var q=s.running.headData[t];if(q.last&&(q.data.sort===true||q.data.sort===undefined)&&s.isPage){var r=true;if(s.running.sorthead){s.running.sorthead.$cell.find(".jfgrid-heed-sort").hide();if(q==s.running.sorthead){var o=q.$cell.find(".jfgrid-heed-sort .active");o.removeClass("active");if(o.hasClass("fa-caret-up")){q.$cell.find(".jfgrid-heed-sort .fa-caret-down").addClass("active");r=false}else{q.$cell.find(".jfgrid-heed-sort .fa-caret-up").addClass("active");r=true}q.$cell.find(".jfgrid-heed-sort").show()}else{q.$cell.find(".jfgrid-heed-sort .active").removeClass("active");q.$cell.find(".jfgrid-heed-sort .fa-caret-up").addClass("active");q.$cell.find(".jfgrid-heed-sort").show();r=true}}else{q.$cell.find(".jfgrid-heed-sort .active").removeClass("active");q.$cell.find(".jfgrid-heed-sort .fa-caret-up").addClass("active");q.$cell.find(".jfgrid-heed-sort").show();r=true}s.running.sorthead=q;if(s.isPage){s.sidx=q.data.name;s.sord=r?"ASC":"DESC";c.reload(p,s)}else{}}},clickRow:function(p,o,u){var n=o;var y=o.attr("rownum");if(!y){n=o.parents(".jfgrid-data-cell");y=n.attr("rownum")}var w=parseInt(y.replace(u.id+"_",""));var x=u.running.rowdata[w];var v=x.jfgridRowData;var s=n.attr("colname");var t=false;a.each(u.running.headData,function(I,H){if(H.data.name==s){if(H.data.edit&&H.$edit&&H.data.edit.type!="layer"&&H.data.isRead!="1"){t=true;var F=n.css("top");var D=n.css("left");var G=n.css("width");H.$edit.css({top:F,left:D,width:G,height:u.rowHeight}).show();var z=H.$edit.find("#jfgrid_edit_"+u.id+"_"+H.data.name);z.unbind("change");H.data.edit.init&&H.data.edit.init(v,z);switch(H.data.edit.type){case"input":z.unbind("input propertychange");z.val(v[s]||"");z.select();z.on("input propertychange",function(J){var K=a(this).val();v[s]=K;H.data.edit.change&&H.data.edit.change(v,w);e(K,H.data,v,x[H.data.name],u)});break;case"select":z.lrselectSet(v[s]||"");z.on("change",function(){var J=a(this);var L=J.lrselectGet();var K=J.lrselectGetEx();v[s]=L;H.data.edit.change&&H.data.edit.change(v,w,K);e(L,H.data,v,x[H.data.name],u)});break;case"radio":z.find("input").unbind("click");z.find('input[value="'+(v[s]||"")+'"]').trigger("click");z.find("input").on("click",function(){var J=a(this).val();if(v[s]!=J){v[s]=J;H.data.edit.change&&H.data.edit.change(v,w);e(J,H.data,v,x[H.data.name],u)}});if((v[s]==""||v[s]==null||v[s]==undefined)&&H.data.edit.dfvalue){z.find('input[value="'+H.data.edit.dfvalue+'"]').trigger("click")}break;case"checkbox":z.find("input").unbind("click");var E=v[s]||"";var A={};var B=v[s]||H.data.edit.dfvalue||"";B+="";v[s]=B;var C=B.split(",");a.each(C,function(J,K){A[K]="1"});z.find("input").each(function(){var J=a(this);var K=J.val();if(J.is(":checked")&&!A[K]){J.trigger("click")}else{if(!J.is(":checked")&&A[K]){J.trigger("click")}}J=null});if(E!=v[s]){H.data.edit.change&&H.data.edit.change(v,w);e(v[s],H.data,v,x[H.data.name],u)}z.find("input").on("click",function(){var J=a(this);var N=J.val();var K=v[s].split(",");var L={};var M=[];a.each(K,function(O,P){if(P!==""&&P!==undefined&&P!==null){L[P]=O;M.push(P)}});if(J.is(":checked")){if(L[N]==undefined){M.push(N)}}else{if(L[N]!=undefined){M.splice(L[N],1)}}v[s]=String(M);H.data.edit.change&&H.data.edit.change(v,w);e(v[s],H.data,v,x[H.data.name],u)});break;case"datatime":z.unbind("change");z.val(v[s]||"");z.select();z.on("change",function(J){var K=a(this).val();v[s]=K;H.data.edit.change&&H.data.edit.change(v,w);e(K,H.data,v,x[H.data.name],u)});break;case"layer":break}}return false}});if(!t){if(u.isMultiselect){var q=x.jfcheck.value;if((q+"")=="1"){x.jfcheck.$cell.find("img").attr("src",h+d[0]);x.jfcheck.value=0;u.multiselectfield&&(v[u.multiselectfield]=0);u.onSelectRow&&u.onSelectRow(v,false);if(!u.running.checkAlling){var r=false;a.each(u.running.rowdata,function(z,A){if(A.jfcheck.value+""=="1"){r=true;return false}});if(r){p.find("#jfgrid_all_cb_"+u.id).attr("src",h+d[2])}else{p.find("#jfgrid_all_cb_"+u.id).attr("src",h+d[0])}}}else{x.jfcheck.$cell.find("img").attr("src",h+d[1]);x.jfcheck.value=1;u.multiselectfield&&(v[u.multiselectfield]=1);u.onSelectRow&&u.onSelectRow(v,true);if(!u.running.checkAlling){var r=false;a.each(u.running.rowdata,function(z,A){if(A.jfcheck.value+""=="0"){r=true;return false}});if(r){p.find("#jfgrid_all_cb_"+u.id).attr("src",h+d[2])}else{p.find("#jfgrid_all_cb_"+u.id).attr("src",h+d[1])}}}}else{p.find("#jfgrid_left_"+u.id+" .jfgrid-selected,#jfgrid_right_"+u.id+" .jfgrid-selected").removeClass("jfgrid-selected");p.find('[rownum="'+y+'"]').addClass("jfgrid-selected");u.onSelectRow&&u.onSelectRow(v);u.running.rowSelected=x}}else{p.find("#jfgrid_left_"+u.id+" .jfgrid-selected,#jfgrid_right_"+u.id+" .jfgrid-selected").removeClass("jfgrid-selected");u.running.rowSelected=null}},checkAllRows:function(o,n,r){var p=n.attr("src").replace(h,"");var q=false;if(p==d[1]){q=true;n.attr("src",h+d[0])}else{n.attr("src",h+d[1])}r.running.checkAlling=true;a.each(r.running.rowdata,function(s,t){if(t.jfcheck.value+""=="0"&&!q){t.jfcheck.$cell.trigger("click")}else{if(t.jfcheck.value+""=="1"&&q){t.jfcheck.$cell.trigger("click")}}});r.running.checkAlling=false},expandSub:function(s,p,z){var o=p;var D=p.attr("rownum");if(!D){o=p.parents(".jfgrid-data-cell");D=o.attr("rownum")}var B=parseInt(D.replace(z.id+"_",""));var C=z.running.rowdata[B];var A=C.jfgridRowData;var n=s.find("#jfgrid_body_"+z.id);var q=s.find("#jfgrid_left_"+z.id);var r=s.find("#jfgrid_right_"+z.id);q.hide();r.hide();var F=z.id+"_sub_"+B;var v=a("#"+z.id+"_sub_"+(z.running.rowdata.length-1)).height()+z.running.rowdata[z.running.rowdata.length-1]["jfsubGrid"].top+z.rowHeight;if(C.jfsubGrid.value){C.jfsubGrid.value=false;var t=a("#"+F);t.remove();C.jfsubGrid.$cell.html('<i class="fa fa-plus" ></i>');for(var w=B+1,y=z.running.rowdata.length;w<y;w++){var x=z.running.rowdata[w];a.each(x,function(H,I){if(I.top!=undefined){I.top=I.top-z.subGridHeight;I.$cell.css({top:I.top})}});var u=a("#"+z.id+"_sub_"+w);if(u.length>0){u.css({top:x.jfsubGrid.top+z.rowHeight})}}q.css({height:v-z.subGridHeight});r.css({height:v-z.subGridHeight})}else{C.jfsubGrid.value=true;var G=n.width();C.jfsubGrid.$cell.html('<i class="fa fa-minus" ></i>');var E=j.newGuid();var t=a('<div class="jfgrid-sub" id="'+F+'" ><div id="'+E+'" ></div></div>').css({left:0,top:C.jfsubGrid.top+z.rowHeight,height:z.subGridHeight,width:G});for(var w=B+1,y=z.running.rowdata.length;w<y;w++){var x=z.running.rowdata[w];a.each(x,function(H,I){if(I.top!=undefined){I.top+=z.subGridHeight;I.$cell.css({top:I.top})}});var u=a("#"+z.id+"_sub_"+w);if(u.length>0){u.css({top:x.jfsubGrid.top+z.rowHeight})}}q.append(t);q.css({height:v+z.subGridHeight});r.css({height:v+z.subGridHeight});z.subGridExpanded&&z.subGridExpanded(E,C.jfgridRowData)}q.show();r.show()},getCheckRow:function(n,o){var p=[];a.each(o.running.rowdata,function(q,r){if(r.jfcheck.value==1){p.push(r.jfgridRowData)}});return p},moveUp:function(n,s,r){if(r>0){var p=true;var o=s.rowdatas[r];if(s.isTree){p=false;if(s.running.rowdata[r].jfdeep<=s.running.rowdata[r-1].jfdeep){for(var q=r-1;q>=0;q--){if(s.running.rowdata[r].jfdeep==s.running.rowdata[q].jfdeep){p=true;s.rowdatas[r]=s.rowdatas[q];s.rowdatas[q]=o;break}}}}else{s.rowdatas[r]=s.rowdatas[r-1];s.rowdatas[r-1]=o}c.dataRender(n,s,s.rowdatas);return true}return false},moveDown:function(n,t,r){if(r<t.rowdatas.length-1){var p=true;var o=t.rowdatas[r];if(t.isTree){p=false;for(var q=r+1,s=t.rowdatas.length;q<s;q++){if(t.running.rowdata[r].jfdeep>t.running.rowdata[q].jfdeep){break}if(t.running.rowdata[r].jfdeep==t.running.rowdata[q].jfdeep){p=true;t.rowdatas[r]=t.rowdatas[q];t.rowdatas[q]=o;break}}}else{t.rowdatas[r]=t.rowdatas[r+1];t.rowdatas[r+1]=o}c.dataRender(n,t,t.rowdatas);return true}return false},turnPage:function(q){var p=a(this);var o=a("#"+p.attr("id").replace("jfgrid_page_bar_num_",""));var s=o[0].dfop;var r=q.target||q.srcElement;var n=a(r);if(n.hasClass("pagebtn")){var t=parseInt(n.text());if(t!=s.running.pageparam.page){p.find(".active").removeClass("active");n.addClass("active");s.running.pageparam.page=t;c.reload(o,s)}}},turnPage2:function(q){var o=a(this);var t=q.data.op;var s=o.text();var n=a("#jfgrid_page_bar_num_"+t.id);var v=parseInt(n.find(".active").text());var r=false;switch(s){case"首页":if(v!=1){t.running.pageparam.page=1;r=true}break;case"上一页":if(v>1){t.running.pageparam.page=v-1;r=true}break;case"下一页":if(v<t.running.pageparam.total){t.running.pageparam.page=v+1;r=true}break;case"尾页":if(v!=t.running.pageparam.total){t.running.pageparam.page=t.running.pageparam.total;r=true}break;case"跳转":var w=o.parents("#jfgrid_page_bar_nums_"+t.id).find("input").val();if(!!w){var u=parseInt(w);if(String(u)!="NaN"){if(u<1){u=1}if(u>t.running.pageparam.total){u=t.running.pageparam.total}t.running.pageparam.page=u;r=true}}break}if(r){c.reload(a("#"+t.id),t)}},print:function(n){var q=n[0].dfop;var o=a('<table border="1" style=""></table>');var r=[];function p(s,t){var u=s.length;a.each(s,function(x,y){r[t]=r[t]||a("<tr></tr>");var v=a("<th>"+y.label+"</th>");if(!!y.children&&y.children.length>0){var z=p(y.children,t+1);u=u+z-1;v.attr("colspan",z)}var w=y.height/28;v.attr("rowspan",w);v.css("text-align",y.align);r[t].append(v)});return u}p(q.headData,0);a.each(r,function(s,t){o.append(t)});a.each(q.rowdatas,function(t,u){var s=a("<tr></tr>");n.find('[rownum="'+q.id+"_"+t+'"]').each(function(){var v=a(this);var x=v.attr("colname");if(!!x&&x!="jfgrid_num"&&x!="jfgrid_multiselect"&&x!="jfgrid_subGrid"){var w=a("<td>"+v.html()+"</td>");w.css("text-align",v.css("text-align"));s.append(w)}});o.append(s)});q=null;return o}};a.fn.jfGrid=function(s){var n=a(this);if(!n[0]||n[0].dfop){return n}var q=n.attr("id");if(q==null||q==undefined||q==""){q="jfgrid"+new Date().getTime();n.attr("id",q)}var o={url:"",param:{},rowdatas:[],headData:[],isShowNum:true,isMultiselect:false,multiselectfield:"",isSubGrid:false,subGridExpanded:false,subGridHeight:300,onSelectRow:false,dblclick:false,onRenderComplete:false,onRenderBefore:false,onAddRow:false,onMinusRow:false,beforeMinusRow:false,isPage:false,rows:100,sidx:"",sord:"ASC",isTree:false,mainId:"id",parentId:"parentId",isEdit:false,isAutoHeight:false,height:0,rowHeight:28,numRowWitdh:30};if(!!s){a.extend(o,s)}o.id=q;n[0].dfop=o;o.running={};if(o.isMultiselect){for(var p=0;p<3;p++){var r=new Image();r.src=h+d[p]}}c.init(n,o);o=null;return n};a.fn.jfGridSet=function(r,p){var n=a(this);var q=n[0].dfop;if(!q){return null}switch(r){case"reload":if(p==undefined||p==null){c.reload(n,q)}else{p=p||q.param||{};q.param=p.param||p;c.reload(n,q)}break;case"refresh":break;case"refreshdata":if(p){q.rowdatas=p.rowdatas||p}c.dataRender(n,q,q.rowdatas);break;case"addRow":q.rowdatas.push(p||{});c.rowRender(n,q,p||{},0);n.find("#jfgrid_nodata_img_"+q.id).hide();break;case"removeRow":a.each(q.rowdatas,function(s,t){if(q.mainId&&p){if(t[q.mainId]==p){q.rowdatas.splice(s,1);return false}}else{if(t==q.running.rowSelected.jfgridRowData){q.rowdatas.splice(s,1);return false}}});var o=n;setTimeout(function(){c.dataRender(o,o[0].dfop,o[0].dfop.rowdatas,0);o=null},100);break;case"nocheck":if(q.isMultiselect){a.each(q.running.rowdata,function(s,t){if(t.jfgridRowData[q.mainId]==p){if(t.jfcheck.value==1){t.jfcheck.$cell.trigger("click")}return false}})}break;case"updateRow":if(q.running.rowSelected){c.updateRow(q.running.rowSelected,q)}else{if(q.running.rowdata[p]){c.updateRow(q.running.rowdata[p],q)}}break;case"moveUp":return c.moveUp(n,q,p);break;case"moveDown":return c.moveDown(n,q,p);break}q=null;n=null};a.fn.jfGridGet=function(o){var n=a(this);var p=n[0].dfop;if(!p){return null}switch(o){case"rowdata":if(p.isMultiselect){return c.getCheckRow(n,p)}else{if(p.running.rowSelected){if(p.running.rowdata[p.running.rowSelected.jfnum.value-1]&&p.running.rowSelected.jfgridRowData==p.running.rowdata[p.running.rowSelected.jfnum.value-1].jfgridRowData){return p.running.rowSelected.jfgridRowData}else{p.running.rowSelected=null;return{}}}else{return{}}}break;case"rowdatas":return p.rowdatas;break;case"rowdatasByArray":break;case"settingInfo":return p;break;case"headData":break;case"showData":var q=[];a.each(p.running.rowdata,function(r,s){var t={};a.each(s,function(u,v){if(u!="jfgridRowData"&&u!="jfnum"&&u!="jfcheck"&&u!="jfsubGrid"){t[u]=v.text}});q.push(t)});return q;break}p=null};a.fn.jfGridValue=function(p){var n=a(this);var q=n[0].dfop;if(!q){return null}if(q.isMultiselect){var r=[];var o=c.getCheckRow(n,q);a.each(o,function(s,t){r.push(t[p])});return String(r)}else{if(q.running.rowSelected){if(q.running.rowdata[q.running.rowSelected.jfnum.value-1]&&q.running.rowSelected.jfgridRowData==q.running.rowdata[q.running.rowSelected.jfnum.value-1].jfgridRowData){return q.running.rowSelected.jfgridRowData[p]}else{q.running.rowSelected=null;return""}}else{return""}}};a.fn.jfGridPrint=function(){var n=a(this);return c.print(n)}})(window.jQuery,top.learun);</script>
<script>
    $(function () {
        $('#lr_layout').lrLayout();

        // 翻译指定标签
        $('.lrlg').each(function () {
            var $this = $(this);
            top.learun.language.get($this.text(), function (text) {
                $this.text(text);
            });
        });
        // 翻译表单标题
        $('.lr-form-item-title').each(function () {
            var $this = $(this);
            var $font = $this.find('font');
            $font.remove();
            top.learun.language.get($this.text(), function (text) {
                if ($font.length > 0) {
                    $this.html(text + '<font face="宋体">*</font>');
                }
                else {
                    $this.text(text);
                }

            });
        });
        // input placeholder 翻译
        $('input[placeholder]').each(function () {
            var $this = $(this);
            var _text = $this.attr('placeholder');
            top.learun.language.get(_text, function (text) {
                $this.attr('placeholder', text);
            });
        });

        top.learun.httpAsync('GET', top.$.rootUrl + '/LR_SystemModule/Module/GetAuthorizeButtonColumnList', { url: lrCurrentUrl }, function (data) {
            lrModuleButtonList = data.btns;
            lrModuleColumnList = data.cols;
            lrModule = data.module;
            window.lrModule = data.forms;
            if (!!window.bootstrap) {
                bootstrap(jQuery, top.learun);
            }
        });



    });
</script>
</body>

</html>
